home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / Chip 11-96.iso / workshop / howto / net2 < prev    next >
Text File  |  1996-05-25  |  137KB  |  3,943 lines

  1.   Linux NET-2/NET-3 HOWTO
  2.   Terry Dawson, terryd@extro.ucc.su.oz.au
  3.   v2.4, 17 Jul 1994
  4.  
  5.   This document aims to describe how to obtain, install and configure
  6.   the Linux NET-2 and NET-3 networking software.
  7.  
  8.   1.  Introduction.
  9.  
  10.   This is the Linux NET-2-HOWTO. This document is a complete rewrite of
  11.   the earlier NET-FAQ, and of the subsequent NET-2-HOWTO versions 1.0+,
  12.   for the new NET-2 and NET-3 tcp/ip networking code for Linux kernels
  13.   1.0 and above.
  14.  
  15.  
  16.   1.1.  Changes from the previous release.
  17.  
  18.  
  19.   Additions:
  20.           PI card driver.
  21.           Net-Kit release information.
  22.           V.35 card information.
  23.  
  24.   Corrections:
  25.           ammended `killing dip' details.
  26.           some tidying from Alan Cox.
  27.           SCC driver properly described.
  28.           general meddling.
  29.  
  30.  
  31.  
  32.  
  33.   1.2.  A brief development history of Linux Networking.
  34.  
  35.   Ross Biro <bir7@leland.stanford.edu> wrote the original kernel based
  36.   networking code for Linux. He used ethernet drivers written by Donald
  37.   Becker <becker@cesdis1.gsfc.nasa.gov>, a slip driver written by
  38.   Laurence Culhane <loz@holmes.demon.co.uk>, and a D-Link driver by
  39.   Bj0rn Ekwall <bj0rn@blox.se>.
  40.  
  41.   The further development of the Linux networking code was later taken
  42.   up by Fred van Kempen <waltje@hacktic.nl>, who took Ross's code and
  43.   produced the NET-2 release of network code. NET-2 went through a
  44.   number of revisions until release NET-2d, when Alan Cox
  45.   <iiitac@pyr.swan.ac.uk> took Fred's NET-2d code and set about
  46.   debugging the code with the aim of producing a stable and working
  47.   release of code for incorporation into the standard kernel releases.
  48.   This code was called NET-2D(ebugged), and has been incorporated into
  49.   the standard kernel releases since some time before Linux vers 1.0 was
  50.   released.
  51.  
  52.   PPP support was added by Michael Callahan, <callahan@maths.ox.ac.uk>
  53.   and  Al Longyear, <longyear@netcom.com>, originally as patches to the
  54.   kernel, and in later releases as an option.
  55.  
  56.   Fred continued developing his kernel network code, and produced
  57.   NET-2E.  A reference for it if you are interested in looking at Fred's
  58.   new work is listed later on in this document.
  59.  
  60.   With the release of Linux vers 1.0, Linus made a decision to continue
  61.   supporting Alan's code as the `standard' network kernel code.
  62.  
  63.   The latest revision of the code, NET-3, appears in kernel releases
  64.   1.1.5 and later, and is essentially the same code, but with many
  65.   fixes, corrections and enhancements.
  66.  
  67.   Alan has added such features as IPX and AX.25 modules.  Florian La
  68.   Roche, <flla@stud.uni-sb.de> has produced an updated distribution of
  69.   network applications.
  70.  
  71.   Unless otherwise stated, this document will refer to the network code
  72.   included in the standard kernel releases. On the whole this document
  73.   will serve for Fred's code as well, but as the development paths are
  74.   now seperate, it is possible that there will be differences between
  75.   the two.
  76.  
  77.  
  78.   2.  Disclaimer.
  79.  
  80.   The Linux networking code is a brand new implementation of kernel
  81.   based tcp/ip networking. It has been developed from scratch, and is
  82.   not a port of any existing kernel networking code.
  83.  
  84.   Because it is a fresh implementation it may still have a number of
  85.   bugs or problems with it, and there may be a number of fixes and
  86.   patches released.  If you are worried about problems then just stick
  87.   to the version of network code released with the standard kernel
  88.   releases and utility sets. The networking code has a small team of
  89.   dedicated people working on it, with a cast of thousands testing the
  90.   code, and collecting and reporting bugs and problems.  Any problem you
  91.   experience is likely to have already been reported, and be being
  92.   worked on, and will possible be corrected soon, so be patient, or if
  93.   you can help, offer your assistance.
  94.  
  95.   We do not, and cannot, know everything there is to know about the
  96.   Linux network software. Please accept and be warned that this document
  97.   probably does contain errors. Please read any README files that are
  98.   included with any of the various pieces of software described in this
  99.   document for more detailed and accurate information. We will attempt
  100.   to keep this document as error-free and up-to-date as possible.
  101.   Versions of software are current as at time of writing.
  102.  
  103.   NOTE: While its name may appear similar to the Berkeley Software
  104.   Distribution NET-2 release, the Linux network code actually has
  105.   nothing at all to do with it. Please don't confuse them.
  106.  
  107.  
  108.   3.  Questions already ?
  109.  
  110.   `The only stupid question is the unasked one.'
  111.  
  112.   If you have general configuration questions, and you have been unable
  113.   to find the answers after reading the other various HOWTO and FAQ
  114.   files, then you would be best served to post them to
  115.   comp.os.linux.help, or, if you believe your question to be
  116.   specifically related to the Linux Network code, then you could post it
  117.   to the NET mailing list. Please include as much relevant information
  118.   as possible, there is nothing more annoying than to have a bug or
  119.   problem reported without sufficient information to even begin
  120.   searching for it.
  121.  
  122.   Version numbers and revisions of code, a detailed account of the
  123.   problem, and the circumstances that caused it to occur, are essential.
  124.   Trace and debug messages where available should also be considered
  125.   mandatory.
  126.  
  127.   If you have a question relating to the configuration of, or problems
  128.   experienced with, any linux distribution, regardless of who has
  129.   provided it, please contact the prople who created the distribution
  130.   first, before attempting to report the problem to the network code
  131.   developers. The reason for this is that some of the distributions use
  132.   non-standard directory structures, and test/non-standard versions of
  133.   code and utilities. The developers of the NET-2 code cannot be
  134.   expected to offer support for the network code as distributed in any
  135.   form, other than as described in this document, or as per distributed
  136.   Alpha/Beta test instructions.
  137.  
  138.   To join the Linux NET channel on the mail list server, send mail to:
  139.  
  140.  
  141.  
  142.        linux-activists@niksula.hut.fi
  143.  
  144.        with the line:
  145.  
  146.        X-Mn-Admin: join NET
  147.  
  148.        at the top of the message body (not the subject line).
  149.  
  150.  
  151.  
  152.  
  153.   Remember, keep in mind that the NET channel is for development
  154.   discussions only.
  155.  
  156.   Note also that a PPP list has been established. To join it, use the
  157.   same procedure as for joining the NET channel, except specify PPP in
  158.   place of NET in the X-Mn-Admin: field.
  159.  
  160.   Note also that a HAMS list has been established. This list has been
  161.   established for the discussion of programs related to Amateur Radio.
  162.   To join it, follow the same procedure as for joining the NET or PPP
  163.   channels, except specify HAMS in place of NET in the X-Mn-Admin:
  164.   field.
  165.  
  166.  
  167.   4.  Related Documentation.
  168.  
  169.   If you are looking for information about tcp/ip networking that this
  170.   HOWTO does not cover, then you might try the following sources, as
  171.   they provide some very useful information.
  172.  
  173.   Olaf Kirch has written a substantial document as part of the Linux
  174.   Documentation Project entitled the Linux Network Administration Guide.
  175.   This is an excellent document. It covers all aspects of setting up and
  176.   using the tcp/ip networking under Linux, including NFS, UUCP, mail,
  177.   News, nameserver etc.
  178.  
  179.   Olaf's book supplements this HOWTO, taking up where this document
  180.   leaves off. This document covers the installation and configuration of
  181.   the NET code, i.e. `How to put your machine on the net'. If you are
  182.   new to unix networking, then I strongly urge you to obtain a copy and
  183.   read it first. It will answer a lot of questions for you that are not
  184.   within the scope of this document.
  185.  
  186.   The current release version is available in:
  187.  
  188.   sunsite.unc.edu
  189.  
  190.  
  191.        /pub/Linux/docs/linux-doc-project/network-guide/*
  192.  
  193.  
  194.  
  195.  
  196.   There are various versions of the document in this directory. The most
  197.   common formats are supported, being plain ascii, Postscript, DVI,
  198.   Latex and groff.
  199.   The Linux Network Administrators Guide is Copyright (c) by Olaf Kirch.
  200.  
  201.   You should also read the other HOWTO documents relevant to networking
  202.   with Linux.
  203.  
  204.   They are:
  205.  
  206.   The Ethernet-HOWTO
  207.   (ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/Ethernet-HOWTO) which you
  208.   should read if you intend using an ethernet card with Linux. It
  209.   includes much more detail on how to select, install and configure an
  210.   ethernet card for Linux.
  211.  
  212.   The Serial-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/Serial-HOWTO.html)
  213.   if you intend using slip or ppp in server mode.
  214.  
  215.   The Mail-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/Mail-HOWTO.html) and
  216.   the News-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/News-HOWTO.html) for
  217.   some specific information on setting up Mail and News on your system.
  218.  
  219.   The UUCP-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/UUCP-HOWTO.html) if
  220.   you will be connecting to the net via UUCP.
  221.  
  222.   For more general information on Unix network configuration another
  223.   good place to look for help on setting up your network is the O'Reilly
  224.   and Associates book TCP/IP Network Administration, (the one with the
  225.   Crab on the cover). Keep in mind that the Linux Network code is now a
  226.   fairly standard implementation of tcp/ip networking, this means that
  227.   the commands to configure and use it will work in much the same way as
  228.   for those for other unix operating systems. Keep in mind though that
  229.   some of the arguments and options might differ slightly from those in
  230.   the book.
  231.  
  232.   If you are after some basic tutorial information on tcp/ip networking
  233.   generally, then you might take a look at the following documents:
  234.  
  235.   athos.rutgers.edu
  236.  
  237.  
  238.        /runet/tcp-ip-admin.doc
  239.        /runet/tcp-ip-admin.ps
  240.        /runet/tcp-ip-intro.doc
  241.        /runet/tcp-ip-intro.ps
  242.  
  243.  
  244.  
  245.  
  246.  
  247.   4.1.  New versions of this document.
  248.  
  249.   The latest released version of this document can be retrieved by
  250.   anonymous ftp from:
  251.  
  252.   sunsite.unc.edu
  253.  
  254.  
  255.        /pub/Linux/docs/HOWTO/NET-2-HOWTO
  256.        /pub/Linux/docs/HOWTO/other-formats/NET-2-HOWTO.{tex,ps,dvi}
  257.  
  258.  
  259.  
  260.  
  261.   via the World Wide Web from the Linux Documentation Project Web Server
  262.   (http://sunsite.unc.edu/mdw/linux.html), at page: NET-2-HOWTO
  263.   (http://susnite.unc.edu/mdw/HOWTO/NET-2-HOWTO.html) or directly from
  264.   me, <terryd@extro.ucc.su.oz.au>. It will also be posted to the
  265.   newsgroups: comp.os.linux.announce, comp.os.linux.help, and
  266.   news.answers periodically.
  267.  
  268.   You can find news.answers FAQ postings, including this one, archived
  269.   on rtfm.mit.edu:/pub/usenet.
  270.  
  271.  
  272.   4.2.  Feedback.
  273.  
  274.   Please send any comments, updates, or suggestions to me,
  275.   <terryd@extro.ucc.su.oz.au>. The sooner I get feedback, the sooner I
  276.   can update and correct this document. If you find any problems with
  277.   it, please mail me instead of posting to one of the newsgroups, as I
  278.   may miss it. Thanks.
  279.  
  280.  
  281.   5.  NET-2/NET-3 Supported functionality.
  282.  
  283.   The NET code is a complete kernel based implementation of tcp/ip for
  284.   Linux.  The NET-2 and NET-3 versions of code support:
  285.  
  286.  
  287.      Ethernet Cards
  288.         Most popular ethernet cards are supported.
  289.  
  290.      SLIP (Serial Line IP) and PPP
  291.         for tcp/ip networking over serial lines such as the telephone
  292.         via modem, or a local cable between two machines.
  293.  
  294.      Van Jacobsen Header Compression
  295.         for compressing the tcp/ip headers to improve slip performance
  296.         over low speed lines.
  297.  
  298.      PLIP (Parallel Lines IP)
  299.         to allow local connections between two machines using your
  300.         printer ports.
  301.  
  302.      NFS (Networked File System)
  303.         to allow you to remotely mount another machines filesystems.
  304.  
  305.      AX.25 (A protocol used by Amateur Radio Operators)
  306.         Alan Cox has some experimental code available.
  307.  
  308.      PI Card (An 8530 SCC based card used by Amateur Radio Operators)
  309.         An experimental PI Card driver is available.
  310.  
  311.      IPX/SPX (Novell)
  312.         to allow you to write custom SPX/IPX applications, or to use
  313.         Linux as an IPX router.
  314.  
  315.   The NET-2 and NET-3 network code does not yet currently support:
  316.  
  317.  
  318.      NCP (Novell) support
  319.         to allow Linux to serve and mount Novell network devices. This
  320.         is being worked on.
  321.  
  322.  
  323.      Lan types other than ethernet
  324.         This means token ring, arcnet, FDDI, etc. An experimental Token
  325.         Ring driver is being developed. An experimental ARCNet driver is
  326.         also being developed.
  327.  
  328.  
  329.      ISDN Support
  330.         this is being developed.
  331.   5.1.  Supported Ethernet cards.
  332.  
  333.   The standard linux kernel release supports the following type of
  334.   Ethernet cards:
  335.  
  336.  
  337.   o  NE2000/NE1000 and close compatibles.
  338.  
  339.   o  WD80*3 and close compatibles.
  340.  
  341.   o  SMC Ultra and close compatibles.
  342.  
  343.   o  3c501 and close compatibles (not recommended).
  344.  
  345.   o  3c503 and close compatibles.
  346.  
  347.   o  3c509/3c579 and close compatibles.
  348.  
  349.   o  HP PCLAN and close compatibles.
  350.  
  351.   o  AT1500 and NE2100 (LANCE and PCnet-ISA) and close compatibles.
  352.  
  353.   o  AT1700 and close compatibles.
  354.  
  355.   o  DEPCA and close compatibles.
  356.  
  357.   o  D-Link DE600 pocket adaptor and close compatibles.
  358.  
  359.   o  D-Link DE620 pocket adaptor (with newer kernel releases)
  360.  
  361.   o  AT-LAN-TEC/RealTek pocket adaptor and close compatibles.
  362.  
  363.   The Ethernet-HOWTO contains a lot of very useful information on the
  364.   supported ethernet cards, including information on how to choose an
  365.   ethernet card if you are intending to puchase some specifically for
  366.   Linux.
  367.  
  368.   As mentioned above, Linux supports other means of network connection
  369.   if you don't have access to an ethernet card or connection. Many
  370.   universities and businesses worldwide offer some form of dial-up
  371.   network access. Generally these forms of access will offer an option
  372.   of either SLIP or PPP access, so you will be well catered for. All you
  373.   will need is a telephone modem, the one you already have may well be
  374.   good enough, and to configure your Linux system appropriately. There
  375.   are sections below that describe exactly what you need.
  376.  
  377.  
  378.   6.  Getting the NET-2/NET-3 software.
  379.  
  380.   Before you can configure the networking software you must obtain all
  381.   of the bits and pieces that make it up. These include the current
  382.   version of the kernel code (version 1.0 or later), the correct system
  383.   libraries, the tcp/ip configuration programs and files (e.g.
  384.   /sbin/ifconfig, /etc/hosts etc.), and finally a set of network
  385.   application programs (such as telnet, ftp, rlogin etc.).
  386.  
  387.   If you obtained Linux from a distribution you may already have all
  388.   that you need. Check and make sure that you do. For example, some
  389.   Linux distributions come with all of the network configuration files,
  390.   binaries, libraries, and kernel installed, so there's no reason to get
  391.   the following files.
  392.  
  393.   NOTE: they may be in directories and files different to those
  394.   specified in this HOWTO document
  395.  
  396.  
  397.   If you DO have the network software, skip to the `Configuring the
  398.   kernel' section. If you DO NOT have the network software follow the
  399.   following directions.
  400.  
  401.  
  402.   6.1.  The kernel source.
  403.  
  404.   Version 1.0 of the Linux kernel is the release version. Any of the
  405.   Linux kernels after that release are enhancements or bug fixes. If you
  406.   feel at all concerned about the possibility of having to patch and
  407.   modify the kernel source, then you should stick to this release, as it
  408.   will do most of what you want it to. In the case of the networking
  409.   code though, I strongly suggest you just take a deep breath and follow
  410.   the newer releases of code, as their have been many changes in the
  411.   newer version kernels that affect networking. I know you hear it from
  412.   everyone and everywhere, but when trying out any new version of kernel
  413.   software you should always ensure that you have sufficient backups of
  414.   your system, should for any reason, something go seriously wrong while
  415.   you are testing.
  416.  
  417.   The current kernel version is found in:
  418.  
  419.   ftp.funet.fi
  420.  
  421.  
  422.        /pub/OS/Linux/PEOPLE/Linus/v1.1/v1.1.23.tar.gz
  423.  
  424.  
  425.  
  426.  
  427.   This is a gzipped file, so you will need gzip to uncompress it.
  428.  
  429.   To install it, try:
  430.  
  431.  
  432.  
  433.        # cd /usr/src
  434.        # mv linux linux.old
  435.        # gzip -dc v.1.1.23.tar.gz | tar xvf -
  436.  
  437.  
  438.  
  439.  
  440.   You may also find some files called patch24.gz ... in the same
  441.   directory. These are patch files. If you have a linux kernel that is
  442.   version 1.1.23 then what this means is that you have linux kernel
  443.   version 1.1.0 with patches 1 to 23 applied, so you won't need to apply
  444.   any of these.  If there are any patch files that are greater than the
  445.   version of kernel you have, you should obtain all of those above, and
  446.   apply them, in sequence, with something like the following commands:
  447.  
  448.  
  449.  
  450.        # cd /usr/src
  451.        # gzip -dc .../patch1.gz | patch -p0
  452.        # gzip -dc .../patch2.gz | patch -p0
  453.        # gzip -dc .../patch3.gz | patch -p0
  454.  
  455.         ...
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.   6.2.  The libraries.
  464.  
  465.   You'll want at least version 4.4.2 of libc, as there were problems
  466.   with earlier version that affected subnet masks.
  467.  
  468.   The current libraries (libc-4.5.26) can be found in:
  469.  
  470.   sunsite.unc.edu
  471.  
  472.  
  473.        /pub/Linux/GCC/
  474.  
  475.  
  476.  
  477.  
  478.   You will need at least the following files:
  479.  
  480.  
  481.   o  image-4.5.26.tar.gz
  482.  
  483.   o  inc-4.5.26.tar.gz
  484.  
  485.   o  extra-4.5.26.tar.gz
  486.  
  487.   o  release.libc-4.5.26
  488.  
  489.   You MUST read release.libc-4.5.26 before you install the libraries.
  490.   Please note the single line in the release document regarding deleting
  491.   the older version of /usr/lib/libgcc.* or else your compiles will not
  492.   link properly. Please note that to use release 4.5.26 you will also
  493.   need at least GCC version 2.5.7, and Linux kernel 1.0 or later.
  494.  
  495.  
  496.   6.3.  The network configuration tool suite.
  497.  
  498.   You will need the utility suite that provides tools to configure your
  499.   network support.
  500.  
  501.   The current NET-2 utility suite is available from:
  502.  
  503.   sunacm.swan.ac.uk
  504.  
  505.  
  506.        /pub/misc/Linux/Networking/PROGRAMS/NetTools/net-tools-1.1.27.tar.gz
  507.  
  508.  
  509.  
  510.  
  511.   Because the kernel networking code is still changing some changes to
  512.   the network tools have been necessary as new kernels are released, so
  513.   you will need to choose the version that is appropiate for the kernel
  514.   version you intend to use.
  515.  
  516.   The filenames reflect the earliest version of kernel that the tools
  517.   will work with. Please choose the filename whose version equals, or is
  518.   less than the version of kernel source you intend to use.
  519.  
  520.   If you use a kernel version 1.1.26 or earlier you should look in:
  521.  
  522.   sunacm.swan.ac.uk
  523.  
  524.  
  525.        /pub/misc/Linux/Networking/PROGRAMS/Other/net032/
  526.  
  527.  
  528.  
  529.   In this directory you will find three versions of the network tools.
  530.   The following table lists net-032 package name with the relevant
  531.   kernel versions:
  532.  
  533.  
  534.  
  535.        net-0.32d-net3.tar.gz     1.1.12+
  536.        net-0.32b.tar.gz          1.1.4+
  537.        net-0.32.old.tar.gz       pre 1.1.4 kernels
  538.  
  539.  
  540.  
  541.  
  542.   These packages include the essential network configuration programs
  543.   such as ifconfig, route, netstat etc. These will be discussed later.
  544.  
  545.  
  546.   6.4.  The network applications.
  547.  
  548.   You will want a number of network application programs. These are
  549.   programs like telnet, ftp, finger and their daemons at least. Florian
  550.   La Roche, <flla@stud.uni-sb.de> has put together a fairly complete
  551.   distribution of network applications in both binary and source form.
  552.   The tcp/ip application binaries and some sample config files are found
  553.   in:
  554.  
  555.   ftp.funet.fi
  556.  
  557.  
  558.        /pub/OS/Linux/PEOPLE/Linus/net-source/NetKit/NetKit-A-0.05.bin.tar.gz
  559.        /pub/OS/Linux/PEOPLE/Linus/net-source/NetKit/NetKit-B-0.04.bin.tar.gz
  560.  
  561.  
  562.  
  563.  
  564.   If there are newer versions then use the newer versions. Please read
  565.   the README file first just to make sure that you have the necessary
  566.   prerequisites.
  567.  
  568.   Be sure to make backups of any config files important to you. If this
  569.   is a new installation you probably don't have any. You can unpack each
  570.   of the packages above with the command:
  571.  
  572.  
  573.  
  574.        # cd /
  575.        # gzip -dc filename.tar.z | tar xzplf -
  576.  
  577.  
  578.  
  579.  
  580.  
  581.   6.5.  Additional drivers or packages.
  582.  
  583.   If you want to add some developmental, or Alpha/Beta test code, such
  584.   as AX.25 support, you will need to obtain the appropriate support
  585.   software for those packages. Please check the relevant sections for
  586.   those packages in this document for more detail.
  587.  
  588.  
  589.   7.  Configuring the kernel.
  590.  
  591.   Before you can use any of the network tools, or configure any network
  592.   devices, you must ensure that your kernel has the necessary network
  593.   support built into it. The best way of doing this is to compile your
  594.   own, selecting which options you want and which you don't.
  595.   Assuming you have obtained and untarred the kernel source already, and
  596.   applied any patches that you might need to have applied to get any
  597.   nonstandard or developmental software installed, all you have to do is
  598.   edit /usr/src/linux/drivers/net/CONFIG. This file has many comments to
  599.   guide you in editing it,and in general you will need to edit very
  600.   little, as it has sensible defaults. In my case I don't need to edit
  601.   it at all.  This file is really necesary if your ethernet card is an
  602.   unusual one, or is one that isn't automatically detected by the
  603.   ethernet driver. It allows you to hard code some of the elements of
  604.   your ethernet hardware. For example, if your ethernet card is a close,
  605.   but not exact clone of a WD-8013, then you might have to configure the
  606.   shared memory address to ensure the driver detects and drives the card
  607.   properly. Please check the Ethernet-HOWTO for more definitive
  608.   information on this file and its effect on ethernet cards. This file
  609.   also contains configurable parameters for PLIP, though the defaults
  610.   should again be ok unless you have a particularly slow machine.
  611.  
  612.   When you are happy that the CONFIG file is suitable for your purposes,
  613.   then you can proceed to build the kernel. Your first step will be to
  614.   edit the top level Makefile to ensure the kernel will be built with
  615.   the appropriate VGA settings, and then you must run the kernel
  616.   configuration program:
  617.  
  618.  
  619.  
  620.        # cd /usr/src/linux
  621.        # make config
  622.  
  623.  
  624.  
  625.  
  626.   You will be asked a series of questions. There are four sections
  627.   relevant to the networking code. They are the General setup,
  628.   Networking options, Network device support, and the Filesystems
  629.   sections. The most difficult to configure is the Network device
  630.   support section, as it is where you select what types of physical
  631.   devices you want configured. On the whole you can just use the default
  632.   values for the other sections fairly safely. The following will give
  633.   you an idea of how to proceed:
  634.  
  635.  
  636.  
  637.        *
  638.        * General setup
  639.        *
  640.         ...
  641.         ...
  642.        Networking support (CONFIG_NET) [y] y
  643.         ...
  644.         ...
  645.  
  646.  
  647.  
  648.  
  649.   In the General setup section you simply select whether you want
  650.   network support or not. Naturally you must answer yes.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.   *
  662.   * Networking options
  663.   *
  664.   TCP/IP networking (CONFIG_INET) [y] y
  665.   IP forwarding/gatewaying (CONFIG_IP_FORWARD) [y] y
  666.   *
  667.   * (it is safe to leave these untouched)
  668.   *
  669.   PC/TCP compatibility mode (CONFIG_INET_PCTCP) [n] n
  670.   Reverse ARP (CONFIG_INET_RARP) [n] n
  671.   Assume subnets are local (CONFIG_INET_SNARL) [y] y
  672.   Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] n
  673.   The IPX protocol (CONFIG_IPX) [n] n
  674.  
  675.  
  676.  
  677.  
  678.   The second half of the Networking options section allows you to enable
  679.   or disable some funky features that you can safely accept the defaults
  680.   on until you have some idea why you want to change them.
  681.  
  682.  
  683.  
  684.        *
  685.        * Network device support
  686.        *
  687.        Network device support? (CONFIG_NETDEVICES) [y]
  688.        Dummy net driver support (CONFIG_DUMMY) [n]
  689.        SLIP (serial line) support (CONFIG_SLIP) [y] y
  690.         CSLIP compressed headers (SL_COMPRESSED) [y] y
  691.        PPP (point-to-point) support (CONFIG_PPP) [y] y
  692.        Load balancing support (experimental) (CONFIG_SLAVE_BALANCING) [n] n
  693.        Do you want to be offered ALPHA test drivers (CONFIG_NET_ALPHA) [n] n
  694.        Western Digital/SMC cards (CONFIG_NET_VENDOR_SMC) [y] y
  695.        WD80*3 support (CONFIG_WD80x3) [y] y
  696.        SMC Ultra support (CONFIG_ULTRA) [n] n
  697.        3COM cards (CONFIG_NET_VENDOR_3COM) [n] n
  698.        Other ISA cards (CONFIG_NET_ISA) [n] n
  699.        PLIP (parallel port) support (CONFIG_PLIP) [n] n
  700.        EISA and on board controllers (CONFIG_NET_EISA) [n] n
  701.        Apricot Xen-II on board ethernet (CONFIG_APRICOT) [n] n
  702.        Pocket and portable adaptors (CONFIG_NET_POCKET) [n] n
  703.        *
  704.  
  705.  
  706.  
  707.  
  708.   This section if the most important, and the most involved. It is where
  709.   you select what hardware devices you want to support. You can see that
  710.   I have selected SLIP support with header compression, PPP, the WD80*3
  711.   driver, and nothing else. Simply answer `y' to whatever you want to
  712.   play with, and `n' to that you don't.
  713.  
  714.  
  715.  
  716.        *
  717.        * Filesystems
  718.        *
  719.         ...
  720.         ...
  721.        /proc filesystem support (CONFIG_PROC_FS) [y]
  722.        NFS filesystem support (CONFIG_NFS_FS) [y]
  723.         ...
  724.         ...
  725.  
  726.  
  727.   If you wish to run an NFS client then you will want to include the NFS
  728.   filesystem type. You will need to include the /proc filesystem because
  729.   a number of the network utilities use it.
  730.  
  731.   After you have completed the configuration, all that remains is to
  732.   actually compile the kernel:
  733.  
  734.  
  735.  
  736.        # make dep
  737.        # make
  738.  
  739.  
  740.  
  741.  
  742.   Don't forget to make zlilo if the new kernel compiles and tests ok.
  743.  
  744.  
  745.   8.  Configuring the Network Devices.
  746.  
  747.   If everything has gone ok so far, then you will have a Linux kernel
  748.   which supports the network devices you intend to use, and you also
  749.   have the network tools with which to configure them. Now comes the fun
  750.   part! You'll need to configure each of the devices you intend to use.
  751.   This configuration generally amounts to telling each device things
  752.   like what its IP address will be, and what network it is connected to.
  753.  
  754.   In past versions of this document I have presented near complete
  755.   versions of the various configuration files and included comments to
  756.   modify or delete lines from them as appropriate. From this version
  757.   onwards I will take a slightly different approach which I hope will
  758.   result in you having a complete set of uncluttered configuration files
  759.   that you have built from scratch so you know exactly what is in them,
  760.   and why. I'll describe each of these files, and their function, as we
  761.   come to them.
  762.  
  763.  
  764.   8.1.  What information do I need before I begin ?
  765.  
  766.   Before you can configure the networking software, you will need to
  767.   know a number of pieces of information about your network connection.
  768.   Your network provider or administrator will be able to provide you
  769.   with most of them.
  770.  
  771.  
  772.   8.1.1.  IP Address.
  773.  
  774.   This is the unique machine address, in dotted decimal notation, that
  775.   your machine will use. An example is 128.253.153.54. Your network
  776.   administrator will provide you with this information.
  777.  
  778.   If you will be using a slip or plip connection you may not need this
  779.   information, so skip it until we get to the slip device.
  780.  
  781.   If you're using the loopback device only, ie no ethernet, slip or plip
  782.   support, then you won't need an ip address as the loopback port always
  783.   uses the address 127.0.0.1.
  784.  
  785.  
  786.   8.1.2.  Network Mask (`netmask').
  787.  
  788.   For performance reasons it is desirable to limit the number of hosts
  789.   on any particular segment of a network. For this reason it is common
  790.   for network administrators to divide their network into a number of
  791.   smaller networks, known as subnets, which each have a portion of the
  792.   network addresses assigned to them. The network mask is a pattern of
  793.   bits, which when overlayed onto an address on your network, will tell
  794.   you which subnetwork it belongs to. This is very important for
  795.   routing, and if you find for example, that you can happily talk to
  796.   people outside your network, but not to some people on your own
  797.   network, then it is quite likely that you have specified an incorrect
  798.   subnet mask.
  799.  
  800.   Your network adminstrators will have chosen the netmask when the
  801.   network was designed, and therefore they should be able to supply you
  802.   with the correct mask to use. Most networks are class-C subnetworks
  803.   which use 255.255.255.0 as their netmask. Other larger networks use
  804.   class-B netmasks (255.255.0.0). The NET-2/NET-3 code will
  805.   automatically select a default mask when you assign an address to a
  806.   device. The default assumes that your network has not been subnetted.
  807.  
  808.   The NET-2/NET-3 code will choose the following masks by default:
  809.  
  810.  
  811.  
  812.        For addresses with the first byte:
  813.        1-127         255.0.0.0         (Class A)
  814.        128-191       255.255.0.0       (Class B)
  815.        192+          255.255.255.0     (Class C)
  816.  
  817.  
  818.  
  819.  
  820.   if one of these doesn't work for you, try another. If this doesn't
  821.   work ask your network administrator or local network guru (dime a
  822.   dozen) for help.
  823.  
  824.   You don't need to worry about a netmask for the loopback port, or if
  825.   you are running slip/plip.
  826.  
  827.  
  828.   8.1.3.  Network Address.
  829.  
  830.   This is your IP address masked (bitwise AND) with your netmask.  For
  831.   example:
  832.  
  833.  
  834.        If your netmask is:           255.255.255.0
  835.        and your IP address is:       128.253.154.32    &&
  836.                                      ---------------
  837.        your Network address is:      128.253.154.0     =
  838.  
  839.  
  840.  
  841.  
  842.  
  843.   8.1.4.  Broadcast Address.
  844.  
  845.   `A shout is a whisper that everyone hears whether they need to or not'
  846.  
  847.   This is normally your network address logically ORed with your netmask
  848.   inverted. This is simpler than it sounds. For a Class-C network, with
  849.   network mask 255.255.255.0, your Broadcast Address will be your
  850.   network address (calculated above), logically ORed with 0.0.0.255, the
  851.   network mask inverted.
  852.  
  853.   A worked example might look like:
  854.  
  855.  
  856.  
  857.  
  858.  
  859.   If your netmask is:          255.255.255.0      !
  860.   the netmask inverted is:       0.  0.  0.255    =
  861.   If your Network address is:  128.253.154.0      ||
  862.                                ----------------
  863.   Your broadcast address is:   128.253.154.255    =
  864.  
  865.  
  866.  
  867.  
  868.   Note that for historical reasons some networks use the network address
  869.   as the broadcast address. If you have any doubts contact your network
  870.   administrator.
  871.  
  872.   If you have access to a sniffer, or some other device capable of
  873.   providing you with a trace of your network traffic, then you might be
  874.   able to determine both the network and broadcast addresses by watching
  875.   other traffic on the lan. Keep an eye open for, (or filter everything
  876.   except), ethernet frames destined for the ethernet broadcast address:
  877.   ff:ff:ff:ff:ff:ff.  If any of them has an IP source address of your
  878.   local router, and the protocol ID is not ARP, then check the
  879.   destination IP address, because this datagram may well be a RIP
  880.   routing broadcast from your router, in which case the destination IP
  881.   address will be your broadcast address.
  882.  
  883.   Once again, if you're not sure, check with your network administrator,
  884.   they'd rather help you, than have you connect your machine
  885.   misconfigured.
  886.  
  887.  
  888.   8.1.5.  Router (`Gateway') Address.
  889.  
  890.   `There must be some way out of here.'
  891.  
  892.   This is the address of the machine that connects your network to the
  893.   rest of the Internet. It is your `gateway' to the outside world. A
  894.   couple of conventions exist for allocating addresses to routers which
  895.   your network might follow, they are: The router is the lowest numbered
  896.   address on the network, the router is the highest numbered host on the
  897.   network.  Probably the most common is the first, where the router will
  898.   have an address that is mostly the same as your own, except with a .1
  899.   as the last byte. eg. if your address is 128.253.154.32, then your
  900.   router might be 128.253.154.1. The router can in fact have any address
  901.   valid on your network and function properly, the address doesn't
  902.   matter at all. There may in fact even be more than one router on your
  903.   network. You will probably need to talk to your network adminstrator
  904.   to properly identify your router address.
  905.  
  906.   If you're using only loopback then you don't need a router address. If
  907.   you're using PPP then you also don't need your router address, because
  908.   PPP will automatically determine the correct address for you. If
  909.   you're using SLIP, then your router address will be your SLIP server
  910.   address.
  911.  
  912.  
  913.   8.1.6.  Nameserver Address.
  914.  
  915.   Most machines on the net have access to a name server which translates
  916.   human tolerable hostnames into machine tolerable addresses, and vice
  917.   versa. Your network administrators will again tell you the address of
  918.   your nearest nameserver. You can in fact run a nameserver on your own
  919.   machine by running named, in which case your nameserver address will
  920.   be 127.0.0.1, the loopback port address.  However it is not required
  921.   that you run named at all; see section `named' for more information.
  922.  
  923.   If you're only using loopback then you don't need to know the
  924.   nameserver address since you're only going to be talking to your own
  925.   machine.
  926.  
  927.  
  928.   8.1.7.  NOTE for SLIP/PLIP/PPP users.
  929.  
  930.   You may or may not in fact need to know any of the above information.
  931.   Whether you do or not will depend on exactly how your network
  932.   connection is achieved, and the capabilities of the machine at the
  933.   other end of the link. You'll find more detail in the section relevant
  934.   to configuration of the SLIP/PLIP and PPP devices.
  935.  
  936.  
  937.   8.2.  /etc/rc.d/rc.inet1,2 or /etc/rc.net
  938.  
  939.   While the commands to configure your network devices can be typed
  940.   manually each time, you will probably want to record them somewhere so
  941.   that your network is configured automatically when you boot your
  942.   machine.
  943.  
  944.   The `rc' files are specifically designed for this purpose. For the
  945.   non-unix-wizard: `rc' file are run at bootup time by the init program
  946.   and start up all of the basic system programs such as syslog, update,
  947.   and cron. They are analagous to the MS-DOS autoexec.bat file, and rc
  948.   might stand for `runtime commands'. By convention these files are kept
  949.   under the /etc directory. The Linux Filesystem Standard doesn't go so
  950.   far as to describe exactly where your rc files should go, stating that
  951.   it is ok for them to follow either the BSD (/etc/rc.*) or System-V
  952.   (/etc/rc.d/rc*) conventions.  Alan, Fred and I all use the System-V
  953.   convention, so that is what you will see described here. This means
  954.   that these files are found in /etc/rc.d and are called rc.inet1 and
  955.   rc.inet2. The first rc file that gets called at bootup time is
  956.   /etc/rc, and it in turn calls others, such as rc.inet1, which in turn
  957.   might called rc.inet2.  It doesn't really matter where they are kept,
  958.   or what they are called, so long as init can find them.
  959.  
  960.   In some distributions the rc file for the network is called rc.net and
  961.   is in the /etc subdirectory. The rc.net file on these systems is
  962.   simply the rc.inet1 and the rc.inet2 files combined into one file that
  963.   gets executed. It doesn't matter where the commands appear, so long as
  964.   you configure the interfaces before starting the network daemons and
  965.   applications.
  966.  
  967.   I will refer to these files as rc.inet1 and rc.inet2, and I keep them
  968.   in the /etc/rc.d, so if you are using one of the distributions that
  969.   uses rc.net, or you want to keep the files somewhere else, then you
  970.   will have to make appropriate adjustments as you go.
  971.  
  972.   We will be building these files from scratch as we go.
  973.  
  974.  
  975.   8.2.1.  rc.inet1
  976.  
  977.   The rc.inet1 file configures the basic tcp/ip interaces for your
  978.   machine using two programs: /sbin/ifconfig, and /sbin/route.
  979.  
  980.  
  981.   8.2.1.1.  ifconfig
  982.  
  983.   /sbin/ifconfig is used for configuring your interfaces with the
  984.   parameters that they require to function, such as their IP address,
  985.   network mask, broadcast addresses and similar. You can use the
  986.   ifconfig command with no parameters to display the configuration of
  987.   all network devices. Please check the ifconfig man page for more
  988.   detail on its use.
  989.  
  990.  
  991.   8.2.1.2.  route
  992.  
  993.   /sbin/route is used to create, modify, and delete entries in a table
  994.   (the routing table) that the networking code will look at when it has
  995.   a datagram that it needs to transmit. The routing table lists
  996.   destination address, and the interface that that address is reachable
  997.   via. You can use the route command with no parameters to display the
  998.   contents of the routing table. Please check the route man page for
  999.   more detail on its use.
  1000.  
  1001.  
  1002.  
  1003.   8.2.2.  rc.inet2
  1004.  
  1005.   The rc.inet2 file starts any network daemons such as inetd, portmapper
  1006.   and so on. This will be covered in more detail in section `rc.inet2',
  1007.   so for the moment we will concentrate on rc.inet1. I have mentioned
  1008.   this file here so that if you have some other configuration, such as a
  1009.   single rc.net file you will understand what the second half of it
  1010.   represents. it is important to remember that you must start your
  1011.   network applications and daemons after you have configured your
  1012.   network devices.
  1013.  
  1014.  
  1015.   8.3.  Configuring the Loopback device (mandatory).
  1016.  
  1017.   The loopback device isn't really a hardware device. It is a software
  1018.   construct that looks like a physical interface. Its function is to
  1019.   happily allow you to connect to yourself, and to test network software
  1020.   without actually having to be connected to a network of any kind. This
  1021.   is great if you are developing network software and you have a slip
  1022.   connection.  You can write and test the code locally, and then when
  1023.   you are ready to test it on a live network, eatablish your slip
  1024.   connection and test it out. You won't hurt others users if your
  1025.   program misbehaves.
  1026.  
  1027.   By convention, the loopback device always has an IP address of
  1028.   127.0.0.1 and so you will use this address when configuring it.
  1029.  
  1030.   The loopback device for Linux is called `lo'. You will now make the
  1031.   first entry into your rc.inet1 file. The following code fragment will
  1032.   work for you:
  1033.  
  1034.  
  1035.  
  1036.        #!/bin/sh
  1037.        #
  1038.        # rc.inet1   --  configures network devices.
  1039.        #
  1040.        # Attach the loopback device.
  1041.        /sbin/ifconfig lo 127.0.0.1
  1042.        #
  1043.        # Add a route to point to the loopback device.
  1044.        /sbin/route add 127.0.0.1
  1045.        # End loopback
  1046.        #
  1047.  
  1048.  
  1049.  
  1050.  
  1051.   You have used the ifconfig program to give the loopback interface its
  1052.   IP address, and route program to create an entry in the routing table
  1053.   that will ensure that all datagrams destined for 127.0.0.1 will be
  1054.   sent to the loopback port.
  1055.  
  1056.  
  1057.   There are two important points to note here.
  1058.  
  1059.   Firstly, the netmask and broadcast addresses have been allowed to take
  1060.   the default values for the loopback device described earlier in
  1061.   section `Network Mask'. To see what they are, try the ifconfig program
  1062.   without any arguments.
  1063.  
  1064.  
  1065.  
  1066.        # ifconfig
  1067.        lo        Link encap Local Loopback
  1068.                  inet addr 127.0.0.1  Bcast 127.255.255.255  Mask 255.0.0.0
  1069.                  UP BROADCAST LOOPBACK RUNNING  MTU 2000  Metric 1
  1070.                  RX packets 0 errors 0 dropped 0 overrun 0
  1071.                  TX packets 30 errors 0 dropped 0 overrun 0
  1072.        #
  1073.  
  1074.  
  1075.  
  1076.  
  1077.   Secondly, its not obvious how the route command chose the loopback
  1078.   device as the device for the route to 127.0.0.1.  The route program is
  1079.   smart enough to know that 127.0.0.1 belongs to the network supported
  1080.   by the loopback device. It works this out by checking the IP address
  1081.   and the netmask. You can use the route command with no arguments to
  1082.   display the contents of the routing table:
  1083.  
  1084.  
  1085.  
  1086.        # route
  1087.        Kernel routing table
  1088.        Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  1089.        127.0.0.0       *               255.0.0.0       U     0      0       30 lo
  1090.        #
  1091.  
  1092.  
  1093.  
  1094.  
  1095.   Note: You might want to use the -n argument if your name resolver is
  1096.   not yet configured properly. The -n argument tells route to just
  1097.   display the numeric addresses, and to not bother looking up the name.
  1098.  
  1099.  
  1100.   8.4.  Configuring an ethernet device. (optional)
  1101.  
  1102.   You'll only be interested in this section  if you wish to configure an
  1103.   ethernet card, if not then skip on ahead to the next section.
  1104.  
  1105.   To configure an ethernet card is only slightly more complicated than
  1106.   configuring the loopback device. This time you should probably specify
  1107.   explicitly the network mask and the broadcast address, unless you are
  1108.   sure that the defaults will work ok, and they probably will.
  1109.  
  1110.   For this you will need the IP address that you have been assigned, the
  1111.   network mask in use on your network, and the broadcast address in use.
  1112.  
  1113.   The first ethernet device for a Linux system is called `eth0', the
  1114.   second `eth1' and so forth. You will now add a section to your
  1115.   rc.inet1 file. The following code fragment will work for you if you
  1116.   change the addresses specified for real ones:
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.   #
  1124.   # Attach an ethernet device
  1125.   #
  1126.   #  configure the IP address, netmask and broadcast address.
  1127.   /sbin/ifconfig eth0 IPA.IPA.IPA.IPA
  1128.   /sbin/ifconfig eth0 netmask NMK.NMK.NMK.NMK
  1129.   /sbin/ifconfig eth0 broadcast BCA.BCA.BCA.BCA
  1130.   #
  1131.   # add a network route to point to it:
  1132.   /sbin/route add -net NWA.NWA.NWA.NWA device eth0
  1133.   #
  1134.   # End ethernet
  1135.   #
  1136.  
  1137.  
  1138.  
  1139.  
  1140.   Where:
  1141.  
  1142.      IPA.IPA.IPA.IPA
  1143.         represents your IP Address.
  1144.  
  1145.      NMK.NMK.NMK.NMK
  1146.         represents your netmask.
  1147.  
  1148.      BCA.BCA.BCA.BCA
  1149.         represents your Broadcast address.
  1150.  
  1151.      NWA.NWA.NWA.NWA
  1152.         represents your Network Address.
  1153.  
  1154.   Note the use of the -net argument to the route command.  This tells
  1155.   route that the route to be added is a route to a network, and not to a
  1156.   host. There is an alternative method of achieving this, you can leave
  1157.   off the -net if you have the network address listed in the
  1158.   /etc/networks file. This is covered later in section `/etc/networks'.
  1159.  
  1160.  
  1161.   8.5.  Configuring a SLIP device (optional)
  1162.  
  1163.   SLIP (Serial Line Internet Protocol) allows you to use tcp/ip over a
  1164.   serial line, be that a phone line with a dialup modem, or a leased
  1165.   line of some sort.  Of course to use slip you need access to a slip-
  1166.   server in your area. Many universities and businesses provide slip
  1167.   access all over the world.
  1168.  
  1169.   Slip uses the serial ports on your machine to carry IP datagrams. To
  1170.   do this it must take control of the serial device. Slip device names
  1171.   are named sl0, sl1 etc. How do these correspond to your serial devices
  1172.   ? The networking code uses what is called an ioctl (i/o control) call
  1173.   to change the serial devices into slip devices. There are two programs
  1174.   supplied that can do this, they are called dip and slattach
  1175.  
  1176.  
  1177.   8.5.1.  dip
  1178.  
  1179.   dip (Dialup IP) is a smart program that is able to set the speed of
  1180.   the serial device, command your modem to dial the remote end of the
  1181.   link, automatically log you into the remote server, search for
  1182.   messages sent to you by the server, and extract information for them
  1183.   such as your IP address, and perform the ioctl necessary to switch
  1184.   your serial port into slip mode. dip has a powerful scripting ability,
  1185.   and it is this that you can exploit to automate your logon procedure.
  1186.  
  1187.   dip comes supplied in the net-032 package. There have been a number of
  1188.   other versions of dip produced which offer a variety of new features.
  1189.   You will find them at:
  1190.  
  1191.   sunsite.unc.edu
  1192.  
  1193.  
  1194.        /pub/Linux/system/Network/serial/dip*
  1195.  
  1196.  
  1197.  
  1198.  
  1199.   The dip-uri version seems to be the more popular, but I suggest you
  1200.   take a close look at each to determine which offers enhancements that
  1201.   you find useful.
  1202.  
  1203.  
  1204.   8.5.2.  slattach
  1205.  
  1206.   slattach on the other hand is a very simple program, that is very easy
  1207.   to use, but does not have the sophistication of dip.  slattach is
  1208.   ideal to use where you have a permanent connection to your server,
  1209.   such as a physical cable, or a leased line.
  1210.  
  1211.  
  1212.   8.5.3.  When do I use which ?
  1213.  
  1214.   You would use dip when your link to the machine that is your slip
  1215.   server is a dialup modem, or some other termporary link. You would use
  1216.   slattach when you have a leased line, perhaps a cable, between your
  1217.   machine and the server, and there is no special action needed to get
  1218.   the link working. See section `Permanent Slip connection' for more
  1219.   information.
  1220.  
  1221.   Configuring slip is much like configuring an Ethernet interface (read
  1222.   section `Configuring an ethernet device' above). However there are a
  1223.   few key differences.
  1224.  
  1225.   First of all, slip links are unlink ethernet networks in that there is
  1226.   only ever two hosts on the network, one at each end of the link.
  1227.   Unlike an ethernet that is available for use as soon are you are
  1228.   cabled, with slip, depending on the type of link you have, you may
  1229.   have to initialise your network connection in some special way.
  1230.  
  1231.   If you are using dip then this would not normally be done at boot
  1232.   time, but at some time later, when you were ready to use the link.  It
  1233.   is possible to automate this procedure. If you are using slattach then
  1234.   you will probably want to add a section to your rc.inet1 file.  This
  1235.   will be described soon.
  1236.  
  1237.   There are two major types of slip servers: Dynamic IP address servers
  1238.   and static IP address servers. Almost every slip server will prompt
  1239.   you to login using a username and password when dialing in. dip can
  1240.   handle logging you in automatically.
  1241.  
  1242.  
  1243.   8.5.4.  Static slip server with a dialup line and DIP.
  1244.  
  1245.   A static slip server in one in which you have been supplied an IP
  1246.   address that is exclusively yours. Each time you connect to the
  1247.   server, you will configure your slip port with that address. The
  1248.   static slip server will answer your modem call, possibly prompt you
  1249.   for a username and password, and then route any datagrams destined for
  1250.   your address to you via that connection. If you have a static server,
  1251.   then you may want to put entries for your hostname and IP address
  1252.   (since you know what it will be) into your /etc/hosts. You should also
  1253.   configure some other files such as: rc.inet2, host.conf, resolv.conf,
  1254.   /etc/HOSTNAME, and rc.local. Remember that when configuring rc.inet1,
  1255.   you don't need to add any special commands for your slip connection
  1256.   since it is dip that does all of the hard work for you in configuring
  1257.   your interface. You will need to give dip the appropriate information,
  1258.   and it will configure the interface for you after commanding the modem
  1259.   to establish the call, and logging you into your slip server.
  1260.  
  1261.   If this is how your slip server works then you can move to section
  1262.   `Using Dip' to learn how to configure dip appropriately.
  1263.  
  1264.  
  1265.   8.5.5.  Dynamic slip server with a dialup line and DIP.
  1266.  
  1267.   A dynamic slip server is one which allocates you an IP address
  1268.   randomly, from a pool of addresses, each time you logon. This means
  1269.   that there is no guarantee that you will have any particular address
  1270.   each time, and that address may well be used by someone else after you
  1271.   have logged off.  The netework administrator who configured the slip
  1272.   server will have assigned a pool of address for the slip server to
  1273.   use, when the server receives a new incoming call, it finds the first
  1274.   unused address, guides the caller through the login process, and then
  1275.   prints a welcome message that contains the IP address it has
  1276.   allocated, and will proceed to use that IP address for the duration of
  1277.   that call.
  1278.  
  1279.   Configuring for this type of server is similar to configuring for a
  1280.   static server, except that you must add a step where you obtain the IP
  1281.   address that the server has allocated for you and configure your slip
  1282.   device with that.
  1283.  
  1284.   Again, dip does the hard work, and new versions are smart enough to
  1285.   not only log you in, but to also be able to automatically read the IP
  1286.   address printed in the welcome message, and store it so that you can
  1287.   have it configure your slip device with it.
  1288.  
  1289.   If this is how your slip server works then you can move to section
  1290.   `Using Dip' to learn how to configure dip appropriately.
  1291.  
  1292.  
  1293.   8.5.6.  Using DIP.
  1294.  
  1295.   As explained earlier, dip is a powerful program that can simplify and
  1296.   automate the process of dialling into the slip server, logging you in,
  1297.   starting the connection, and configuring your slip devices with the
  1298.   appropriate ifconfig and route commands.
  1299.  
  1300.   Essentially to use dip you'll write a `chat script', which is
  1301.   basically a list of commands that dip understands that tell dip how to
  1302.   perform each of the actions you want it to perform. See sample.dip in
  1303.   the net-032 package for an explanation.  dip is quite a powerful
  1304.   program, with many options. Instead of going into all of them here you
  1305.   should looks at the man page, README and sample files from tsx-11, and
  1306.   the net-032 distribution.
  1307.  
  1308.   You may notice that the sample.dip script assumes that you're using a
  1309.   static slip server, so you know what your IP address is beforehand.
  1310.   For dynamic slip servers, the newer versions of dip include a command
  1311.   you can use to automatically read and configure your slip device with
  1312.   the IP address that the dynamic server allocates for you. The
  1313.   following sample was supplied by Paul Mossip, and is probably a good
  1314.   starting point for you. You might like to save it as /etc/dipscript:
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.   #
  1322.   # Connection script for SLIP to knoware.nl.mugnet.org
  1323.   #
  1324.  
  1325.     # Fetch the IP address of our target host.
  1326.   main:
  1327.  
  1328.     # Set the desired serial port and speed.
  1329.     port /dev/cua0
  1330.     speed 38400
  1331.  
  1332.     # Reset the modem and terminal line.
  1333.     reset
  1334.  
  1335.     # Prepare for dialing.
  1336.     send ATZ1\r
  1337.     wait OK 4
  1338.     if $errlvl != 0 goto error
  1339.     dial 666-0999                    ## Change to your server's number!
  1340.     if $errlvl != 0 goto error
  1341.     wait CONNECT 60
  1342.     if $errlvl != 0 goto error
  1343.  
  1344.     # We are connected.  Login to the system.
  1345.   login:
  1346.     sleep 3
  1347.     send \r\n\r\n
  1348.     wait gracelands> 20              ## Change to your server's prompt
  1349.     if $errlvl != 0 goto error
  1350.     send login\n
  1351.     wait name: 10                    ## Wait username: prompt
  1352.     if $errlvl != 0 goto erro
  1353.     send elvisp\n                    ## Change to your own!
  1354.     wait ord: 10                     ## Wait password prompt
  1355.     if $errlvl != 0 goto error
  1356.     send alive\n                     ## Change to your own!
  1357.     wait gracelands> 10
  1358.     if $errlvl != 0 goto error
  1359.     send slip\n                      ## Change to suit your server
  1360.     wait SLIP 30                     ## Wait for SLIP prompt
  1361.     if $errlvl != 0 goto error
  1362.     get $local remote 10             ## Assumes the server sends your IP..
  1363.     if $errlvl != 0 goto error       ## address as soon as you enter slip.
  1364.     get $remote gracelands           ## slip server address from /etc/hosts
  1365.   done:
  1366.     print CONNECTED to $remote with address $rmtip we are $local
  1367.     default
  1368.     mode SLIP
  1369.     goto exit
  1370.   error:
  1371.     print SLIP to $host failed.
  1372.   exit:
  1373.   #
  1374.   # End dip script
  1375.  
  1376.  
  1377.  
  1378.  
  1379.   The above example assumes you are calling a dynamic slip server, if
  1380.   you are calling a static slip server, then remove the following two
  1381.   lines:
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.   get $local remote 10             ## Assumes the server sends your IP..
  1388.   if $errlvl != 0 goto error       ## address as soon as you enter slip.
  1389.  
  1390.  
  1391.  
  1392.  
  1393.   When dip is given the get $local command it searches the incoming text
  1394.   from the remote end for a string that looks like an IP address, ie
  1395.   strings numbers seperated by `.' characters. This modification was put
  1396.   in place specifically for dynamic slip servers, so that the process of
  1397.   reading the IP address granted by the server could be automated.
  1398.  
  1399.   The example above will automaticaly create a default route via your
  1400.   slip link, if this is not what you want, you might have an ethernet
  1401.   connection that should be your default route, then remove the default
  1402.   command from the script.  After this script has finished running, if
  1403.   you do an ifconfig command, you will see that you have a device sl0.
  1404.   This is your slip device.  Should you need to, you can modify its
  1405.   configuration manually, after the dip command has finished, using the
  1406.   ifconfig and route commands.
  1407.  
  1408.   Please note that dip allows you to select a number of different
  1409.   protocols to use with the mode command, the most common example is
  1410.   cslip for slip with compression. Please note that both ends of the
  1411.   link must agree, so you should ensure that whatever you select agrees
  1412.   with what your server is set to.
  1413.  
  1414.   The above example is fairly robust and should cope with most errors.
  1415.   Please refer to the dip man page for more information. Naturally you
  1416.   could, for example, code the script to do such things as redial the
  1417.   server if it doesn't get a connection within a prescribed period of
  1418.   time, or even try a series of servers if you have access to more than
  1419.   one.
  1420.  
  1421.  
  1422.   8.5.7.  Permament slip connection using a leased line and slattach.
  1423.  
  1424.   If you have a cable between two machines, or are fortunate enough to
  1425.   have a leased line, or some other permanent serial connection between
  1426.   your machine and another, then you don't need to go to all the trouble
  1427.   of using dip to set up your serial link. slattach is a very simple to
  1428.   use utility that will allow you just enough functionality to configure
  1429.   your connection.
  1430.  
  1431.   Since your connection will be a permanent one, you will want to add
  1432.   some commands to your rc.inet1 file. In essence all you need to do for
  1433.   a permament connection is ensure that you configure the serial device
  1434.   to the correct speed and switch the serial device into slip mode.
  1435.   slattach allows you to do this with one command. Add the following to
  1436.   your rc.inet1 file:
  1437.  
  1438.  
  1439.  
  1440.        #
  1441.        # Attach a leased line static slip connection
  1442.        #
  1443.        #  configure /dev/cua0 for 19.2kbps and cslip
  1444.        /sbin/slattach -p cslip -s 19200 /dev/cua0 &
  1445.        /sbin/ifconfig sl0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1446.        #
  1447.        # End static slip.
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.   Where:
  1454.  
  1455.      IPA.IPA.IPA.IPA
  1456.         represents your IP address.
  1457.  
  1458.      IPR.IPR.IPR.IPR
  1459.         represents the IP address of the remote end.
  1460.  
  1461.   slattach allocated the first unallocated slip device to the serial
  1462.   device specified. slattach starts with sl0. Therefore the first
  1463.   slattach command attaches slip device sl0 to the serial device
  1464.   specified, and sl1 the next time, etc.
  1465.  
  1466.   slattach allows you to configure a number of different protocols with
  1467.   the -p argument. In your case you will use either slip or cslip
  1468.   depending on whether you want to use compression or not.  Note: both
  1469.   ends must agree on whether you want compression or not.
  1470.  
  1471.  
  1472.   8.6.  Configuring a PLIP device. (optional)
  1473.  
  1474.   plip (Parallel Line IP), is like slip, in that it is used for
  1475.   providing a point to point network connection between two machines,
  1476.   except that it is designed to use the parallel printer ports on your
  1477.   machine instead of the serial ports. Because it is possible to
  1478.   transfer more than one bit at a time with a parallel port, it is
  1479.   possible to attain higher speeds with the plip interface than with a
  1480.   standard serial device. In addition, even the simplest of parallel
  1481.   ports, printer ports, can be used, in lieu of you having to purchase
  1482.   comparitively expensive 16550AFN UART's for your serial ports.
  1483.  
  1484.   Please note that some laptops use chipsets that will not work with
  1485.   PLIP because they do not allow some combinations of signals that PLIP
  1486.   relies on, that printers don't use.
  1487.  
  1488.   The Linux plip interface is compatible with the Crywyr Packet Driver
  1489.   PLIP, and this will mean that you can connect your Linux machine to a
  1490.   DOS machine running any other sort of tcp/ip software via plip.
  1491.  
  1492.   When compiling the kernel, there is only one file that might need to
  1493.   be looked at to configure plip. That file is
  1494.   /usr/src/linux/driver/net/CONFIG, and it contains plip timers in mS.
  1495.   The defaults are probably ok in most cases. You will probably need to
  1496.   increase them if you have an especially slow computer, in which case
  1497.   the timers to increase are actually on the other computer.
  1498.  
  1499.   To configure a plip interface, you will need to add the following
  1500.   lines to your rc.inet1 file:
  1501.  
  1502.  
  1503.  
  1504.        #
  1505.        # Attach a PLIP interface
  1506.        #
  1507.        #  configure first parallel port as a plip device
  1508.        /sbin/ifconfig plip0 IPA.IPA.IPA.IPA pointopoint IPR.IPR.IPR.IPR up
  1509.        #
  1510.        # End plip
  1511.  
  1512.  
  1513.  
  1514.  
  1515.   Where:
  1516.  
  1517.      IPA.IPA.IPA.IPA
  1518.         represents your IP address.
  1519.      IPR.IPR.IPR.IPR
  1520.         represents the IP address of the remote machine.
  1521.  
  1522.   The pointopoint parameter has the same meaning as for slip, in that it
  1523.   specifies the address of the machine at the other end of the link.
  1524.  
  1525.   In almost all respects you can treat a plip interface as though it
  1526.   were a slip interface, except that neither dip nor slattach need be,
  1527.   nor can be, used.
  1528.  
  1529.  
  1530.   8.6.1.  PLIP cabling diagram.
  1531.  
  1532.   plip has been designed to use cables with the same pinout as those
  1533.   commonly used by the better known of the MS-DOS based pc-pc file
  1534.   transfer programs.
  1535.  
  1536.  
  1537.   The pinout diagram (taken from /usr/src/linux/drivers/net/plip.c)
  1538.   looks as follows:
  1539.  
  1540.  
  1541.  
  1542.        Pin Name    Connect pin - pin
  1543.        ---------   -------------------------------
  1544.        GROUND      25 - 25
  1545.        D0->ERROR   2 - 15
  1546.        ERROR->D0   15 - 2
  1547.        D1->SLCT    3 - 13
  1548.        SLCT->D1    13 - 3
  1549.        D2->PAPOUT  4 - 12
  1550.        PAPOUT->D2  12 - 4
  1551.        D3->ACK     5 - 10
  1552.        ACK->D3     10 - 5
  1553.        D4->BUSY    6 - 11
  1554.        BUSY->D4    11 - 6
  1555.        D5          7*
  1556.        D6          8*
  1557.        D7          9*
  1558.        STROBE      1*
  1559.        FEED        14*
  1560.        INIT        16*
  1561.        SLCTIN      17*
  1562.  
  1563.  
  1564.  
  1565.  
  1566.   Notes: Do not connect the pins marked with an asterisk `*'.  Extra
  1567.   grounds are 18,19,20,21,22,23, and 24.
  1568.  
  1569.   If the cable you are using has a metallic shield, it should be
  1570.   connected to the metallic DB-25 shell at one end only.
  1571.  
  1572.   Warning: A miswired PLIP cable can destroy your controller card. Be
  1573.   very careful, and double check every connection to ensure you don't
  1574.   cause yourself any unnecessary work or heartache.
  1575.  
  1576.   While you may be able to run PLIP cables for long distances, you
  1577.   should avoid it if you can. The specifications for the cable allow for
  1578.   a cable length of about 1 metre or so. Please be very careful when
  1579.   running long plip cables as sources of strong electromagnetic fields
  1580.   such as lightning, power lines, and radio transmitters can interfere
  1581.   with and sometimes even damage your controller. If you really want to
  1582.   connect two of your computers over a large distance you really should
  1583.   be looking at obtaining a pair of thin-net ethernet cards and running
  1584.   some coaxial cable.
  1585.   9.  Routing. (mandatory)
  1586.  
  1587.   After you have configured all of your network devices you need to
  1588.   think about how your machine is going to route IP datagrams. If you
  1589.   have only one network device configured then your choice is easy, as
  1590.   all datagrams for any machine other than yours must go via that
  1591.   interface. If you have more than one network interface then your
  1592.   choice is a little more complicated. You might have both an ethernet
  1593.   device and slip connection to your machine at home. In this situation
  1594.   you must direct all datagrams for your machine at home via your slip
  1595.   interface, and all else via the ethernet device. Routing is actually a
  1596.   very simple mechanism, but don't worry if you find it slightly
  1597.   difficult to understand at first; everybody does.
  1598.  
  1599.   You can display the contents of your routing table by using the route
  1600.   command without any options.
  1601.  
  1602.   There are four commonly used routing mechanisms for unix network
  1603.   configurations.  I'll briefly discuss each in turn.
  1604.  
  1605.  
  1606.   9.1.  Static/Manual Routes.
  1607.  
  1608.   Static routing, as its name implies, is `hard coded' routing, that is,
  1609.   it will not change if your network suffers some failure, or if an
  1610.   alternate route becomes available. Static routes are often used in
  1611.   cases where you have a very simple network with no alternate routes
  1612.   available to a destination host, that is, there is only one possible
  1613.   network path to a destination host, or where you want to route a
  1614.   particular way to a host regardless of network changes.
  1615.  
  1616.   In Linux there is a special use for manual routes, and that is for
  1617.   adding a route to a slip or plip host where you have used the ifconfig
  1618.   pointopoint parameter. If you have a slip/plip link, and have the
  1619.   pointopoint parameter specifying the address of the remote host, then
  1620.   you should add a static route to that address so that the ip routing
  1621.   software knows how to route datagrams to that address. The route
  1622.   command you would use for the slip/plip link via leased line example
  1623.   presented earlier would be:
  1624.  
  1625.  
  1626.  
  1627.        #/sbin/route add IPR.IPR.IPR.IPR
  1628.  
  1629.  
  1630.  
  1631.  
  1632.   Where:
  1633.  
  1634.      IPR.IPR.IPR.IPR
  1635.         represents the IP address of the remote end.
  1636.  
  1637.  
  1638.   9.2.  Default Route.
  1639.  
  1640.   The default route mechanism is probably the most common and most
  1641.   useful to most end-user workstations and hosts on most networks. The
  1642.   default route is a special static route that matches every destination
  1643.   address, so that if there is no more specific route for a datagram to
  1644.   be sent to, then the default route will be used.
  1645.  
  1646.   If you have a configuration where you have only a single ethernet
  1647.   interface, or a single slip interface device defined then you should
  1648.   point your default route via it. In the case of an ethernet interface,
  1649.   the Linux kernel knows where to send datagrams for any host on your
  1650.   network. It works this out using the network address and the network
  1651.   mask as discussed earlier. This means that the only datagrams the
  1652.   kernel won't know how to properly route will be those for people not
  1653.   on your network. To make this work you would normally have your
  1654.   default route point to your router address, as it is your means of
  1655.   getting outside of your local network. If you are using a slip
  1656.   connection, then your slip server will be acting as your router, so
  1657.   your default route will be via your slip server.
  1658.  
  1659.   To configure your default route, add the following to your rc.inet1
  1660.   after all of your network device configurations:
  1661.  
  1662.  
  1663.  
  1664.        #
  1665.        # Add a default route.
  1666.        #
  1667.        /sbin/route add default gw RGA.RGA.RGA.RGA
  1668.        #
  1669.  
  1670.  
  1671.  
  1672.  
  1673.   Where:
  1674.  
  1675.      RGA.RGA.RGA.RGA
  1676.         represents your Router/Gateway Address.
  1677.  
  1678.  
  1679.   9.3.  Proxy ARP.
  1680.  
  1681.   This method is ugly, hazard prone and should be used with extreme
  1682.   care, some of you will want to use it anyway.
  1683.  
  1684.   Those with the greatest need for proxy arp will be those of you who
  1685.   are configuring your Linux machine as a slip dial-in server. For those
  1686.   of you who will be using PPP, the PPP daemon simplifies and automates
  1687.   this task, making it a lot safer to use.
  1688.  
  1689.   Normally when a host on your ethernet network wants to talk to you, it
  1690.   knows your IP address, but doesn't know what hardware (ethernet)
  1691.   address to send datagrams to. The ARP mechanism is there specifically
  1692.   to provide that mapping function between network address and hardware
  1693.   address.
  1694.  
  1695.   If you want to use your machine as a server for other machines, you
  1696.   must get your machine to answer ARP requests for their IP addresses on
  1697.   their behalf, as they will not be physically connected to the ethernet
  1698.   network. Lets say that you have been assigned a number of IP addresses
  1699.   on your local network that you will be offering to dial-in slip users.
  1700.   Lets say those addresses are: 128.253.154.120-124, and that you have
  1701.   an ethernet card with a hardware address of 00:00:C0:AD:37:1C. (You
  1702.   can find the hardware address of your ethernet card by using the
  1703.   ifconfig command with no options). To instruct your Linux server to
  1704.   answer arp requests by proxy for these addresses you would need to add
  1705.   the following commands to the end of your rc.inet1 file:
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.   #
  1718.   # Proxy ARP for those dialin users who will be using this
  1719.   #           machine as a server:
  1720.   #
  1721.   /sbin/arp -s 128.263.154.120 00:00:C0:AD:37:1C pub
  1722.   /sbin/arp -s 128.263.154.121 00:00:C0:AD:37:1C pub
  1723.   /sbin/arp -s 128.263.154.122 00:00:C0:AD:37:1C pub
  1724.   /sbin/arp -s 128.263.154.123 00:00:C0:AD:37:1C pub
  1725.   /sbin/arp -s 128.263.154.124 00:00:C0:AD:37:1C pub
  1726.   #
  1727.   # End proxy arps.
  1728.  
  1729.  
  1730.  
  1731.  
  1732.   The pub argument stands for `publish'. It is this argument that
  1733.   instructs your machine to answer requests for these addresses, even
  1734.   though they are not for your machine. When it answers it will supply
  1735.   the hardware address specified, which is of course its own hardware
  1736.   address.
  1737.  
  1738.   Naturally you will need to ensure that you have routes configured in
  1739.   your linux server that point these addresses to the slip device on
  1740.   which they will be connecting.
  1741.  
  1742.   If you are using PPP, you don't need to worry about manually messing
  1743.   with the arp table, as the pppd will manage those entries for you if
  1744.   you use the proxyarp parameter, and as long as the IP addresses of the
  1745.   remote machine and the server machine are in the same network. You
  1746.   will need to supply the netmask of the network on the server's pppd
  1747.   command line.
  1748.  
  1749.  
  1750.   9.4.  gated - the routing daemon.
  1751.  
  1752.   gated could be used in place of proxy arp in some cases, and would
  1753.   certainly be much cleaner, but its primary use is if you want your
  1754.   linux machine to act as an intelligent ip router for your network.
  1755.   gated provides support for a number of routing protocols. Among these
  1756.   are RIP, BGP, EGP, HELLO, and OSPF. The most commonly used in small
  1757.   networks being rip. rip stands for `Routing Information Protocol'. If
  1758.   you run gated, configured for rip, your linux machine will
  1759.   periodically broadcast a copy of its routing table to your network in
  1760.   a special format. In this way, all of the other machines on your
  1761.   network will know what addresses are accessible via your machine.
  1762.  
  1763.   gated can be used to replace proxy arp when all hosts on your network
  1764.   run either gated or routed. If you have a network where you use a
  1765.   mixture of manual and dynamic routes, you should mark any manual
  1766.   routes as `passive' to ensure that they aren't destroyed by gated
  1767.   because it hasn't received an update for them.
  1768.  
  1769.   gated would normally be started from your rc.inet2 which is covered in
  1770.   the next section. You might already see a daemon called routed
  1771.   running. gated is superior to routed in that it is more flexible and
  1772.   more functional. So you should use gated and not routed.
  1773.  
  1774.  
  1775.   9.4.1.  Obtaining gated
  1776.  
  1777.   Gated is available from:
  1778.  
  1779.   sunsite.unc.edu
  1780.  
  1781.  
  1782.  
  1783.   /pub/Linux/system/Network/daemons/gated.linux.bin.tgz
  1784.                                    /gated.linux.man.tgz
  1785.                                    /gated.linux.tgz
  1786.  
  1787.  
  1788.  
  1789.  
  1790.   gated.linux.tgz is the source, so you probably won't need it unless
  1791.   you wish to recompile the binaries for some reason.
  1792.  
  1793.  
  1794.   9.4.2.  Installing gated
  1795.  
  1796.   The gated binary distribution comprises three programs and two sample
  1797.   configuration files.
  1798.  
  1799.   The programs are:
  1800.  
  1801.  
  1802.      gated
  1803.         the actual gated daemon.
  1804.  
  1805.      gdc
  1806.         the operational user interface for gated. gdc is for controlling
  1807.         the gated daemon, stopping and starting it, obtaining its status
  1808.         and the like.
  1809.  
  1810.      ripquery
  1811.         a diagnostic tool to query the known routes of a gateway using
  1812.         either a `rip query' or a `rip poll'.
  1813.  
  1814.   The configuration files are:
  1815.  
  1816.  
  1817.      gated.conf
  1818.         this is the actual configuration file for the gated daemon. It
  1819.         allows you to specify how gated will behave when it is running.
  1820.         You can enable and disable any of the routing protocols, and
  1821.         control the behaviour of those routing protocols running.
  1822.  
  1823.      gated.version
  1824.         a text file that describes the version number of the gated
  1825.         daemon
  1826.  
  1827.   The gated binary distribution will not install the gated files in the
  1828.   correct place for you. Fortunately there aren't very many, so its
  1829.   fairly simple to do.
  1830.  
  1831.   To install the binaries try the following:
  1832.  
  1833.  
  1834.  
  1835.        # cd /tmp
  1836.        # gzip -dc .../gated.linux.bin.tgz | tar xvf -
  1837.        # install -m 500 bin/gated /usr/etc
  1838.        # install -m 444 bin/gated.conf bin/gated.version /etc
  1839.        # install -m 555 bin/ripquery bin/gdc /sbin
  1840.        # rm -rf /tmp/bin
  1841.  
  1842.  
  1843.  
  1844.  
  1845.   I keep the networking daemons in /usr/etc, if yours are somewhere else
  1846.   then naturally you'll have to change the target directory. The sample
  1847.   gated configuration file included configures gated to emulate the old
  1848.   routed daemon.
  1849.   To install the man files, try the following:
  1850.  
  1851.  
  1852.  
  1853.        # cd /tmp
  1854.        # gzip -dc .../gated.linux.man.tgz | tar xvf -
  1855.        # install -m 444 man/*.8 /usr/man/man8
  1856.        # install -m 444 man/*.5 /usr/man/man5
  1857.        # rm -rf /tmp/man
  1858.  
  1859.  
  1860.  
  1861.  
  1862.   The man files contain concise and detailed information on the
  1863.   configuration and use of gated. For information on configuring gated,
  1864.   refer to the gated-config man page.
  1865.  
  1866.  
  1867.   10.  Configuring the network daemons.
  1868.  
  1869.   As mentioned earlier, there are other files that you will need to
  1870.   complete your network installation. These files concern higher level
  1871.   configurations of the network software. Each of the important ones are
  1872.   covered in the following sub-sections, but you will find there are
  1873.   others that you will have to configure as you become more familiar
  1874.   with the network suite.
  1875.  
  1876.  
  1877.   10.1.  /etc/rc.d/rc.inet2 (the second half of rc.net)
  1878.  
  1879.   If you have been following this document you should at this stage have
  1880.   built an rc file to configure each of your network devices with the
  1881.   correct addresses, and set up whatever routing you will need for your
  1882.   particular network configuration. You will now need to actually start
  1883.   some of the higher level network software.
  1884.  
  1885.   Now would be a really good time to read Olaf's Network Administrators
  1886.   Guide, as it really should be considered the definitive document for
  1887.   this stage of the configuration process. It will help you decide what
  1888.   to include in this file, and more importantly perhaps, what not to
  1889.   include in this file. For the security conscious it is a fair
  1890.   statement to say that the more network services you have running, the
  1891.   more likely the chance of your system having a security hole: Run only
  1892.   what you need.
  1893.  
  1894.   There are some very important daemons (system processes that run in
  1895.   the background) that you will need to know a little about. The man
  1896.   pages will tell you more, but they are:
  1897.  
  1898.  
  1899.   10.1.1.  inetd.
  1900.  
  1901.   inetd is a program that sits in the background and manages internet
  1902.   connection requests and the like. It is smart enough that you don't
  1903.   need to leave a whole bunch of servers running when there is nothing
  1904.   connected to them.  When it sees an incoming request for a particular
  1905.   service, eg telnet, or ftp, it will check the /etc/services file, find
  1906.   what server program needs to be run to manage the request, start it,
  1907.   and hand the connection over to it. Imagine it as a master server for
  1908.   your internet servers. It also has a few simple standard services
  1909.   inbuilt. These are echo, discard and generate services used for
  1910.   various types of network testing.
  1911.  
  1912.  
  1913.  
  1914.  
  1915.   10.1.2.  syslogd.
  1916.  
  1917.   syslogd is a daemon that handles all system logging. It accepts
  1918.   messages generated for it and will distribute them according to a set
  1919.   of rules contained in /etc/syslogd.conf. For example, certain types of
  1920.   messages you will want to send to the console, and also to a log file,
  1921.   where others you will want only to log to a file. syslogd allows you
  1922.   to specify what messages should go where.
  1923.  
  1924.  
  1925.   10.2.  A sample rc.inet2 file.
  1926.  
  1927.   The following is a sample rc.inet2 file that Fred built. It starts a
  1928.   large number of servers, so you might want to trim it down to just
  1929.   those services that you actually want to run. To trim it down, simply
  1930.   delete or comment out the stanzas (if to fi) that you don't need. All
  1931.   each stanza does is test that the relevant module is a file, that it
  1932.   exists, echoes a comment that you can see when you boot your machine,
  1933.   and then executes the commands with the arguments supplied to ensure
  1934.   that it runs happily in the background. For more detailed information
  1935.   on each of the deamons, check either the Network Administrators Guide
  1936.   or the relevant man pages.
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.   #! /bin/sh
  1982.   #
  1983.   # rc.inet2      This shell script boots up the entire INET system.
  1984.   #               Note, that when this script is used to also fire
  1985.   #               up any important remote NFS disks (like the /usr
  1986.   #               distribution), care must be taken to actually
  1987.   #               have all the needed binaries online _now_ ...
  1988.   #
  1989.   # Version:      @(#)/etc/rc.d/rc.inet2  2.18    05/27/93
  1990.   #
  1991.   # Author:       Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  1992.   #
  1993.  
  1994.   # Constants.
  1995.   NET="/usr/etc"
  1996.   IN_SERV="lpd"
  1997.   LPSPOOL="/var/spool/lpd"
  1998.  
  1999.   # At this point, we are ready to talk to The World...
  2000.   echo -e "\nMounting remote file systems ..."
  2001.   /bin/mount -t nfs -v            # This may be our /usr runtime!!!
  2002.  
  2003.   echo -e "\nStarting Network daemons ..."
  2004.   # Start the SYSLOG daemon.  This has to be the first server.
  2005.   # This is a MUST HAVE, so leave it in.
  2006.   echo -n "INET: "
  2007.   if [ -f ${NET}/syslogd ]
  2008.   then
  2009.           echo -n "syslogd "
  2010.           ${NET}/syslogd
  2011.   fi
  2012.  
  2013.   # Start the SUN RPC Portmapper.
  2014.   if [ -f ${NET}/rpc.portmap ]
  2015.   then
  2016.           echo -n "portmap "
  2017.           ${NET}/rpc.portmap
  2018.   fi
  2019.  
  2020.   # Start the INET SuperServer
  2021.   # This is a MUST HAVE, so leave it in.
  2022.   if [ -f ${NET}/inetd ]
  2023.   then
  2024.           echo -n "inetd "
  2025.           ${NET}/inetd
  2026.   else
  2027.           echo "no INETD found.  INET cancelled!"
  2028.           exit 1
  2029.   fi
  2030.  
  2031.   # Start the NAMED/BIND name server.
  2032.   if [ ! -f ${NET}/named ]
  2033.   then
  2034.           echo -n "named "
  2035.           ${NET}/named
  2036.   fi
  2037.  
  2038.   # Start the ROUTEd server.
  2039.   # NOTE: routed is now obselete. You should now use gated.
  2040.   #if [ -f ${NET}/routed ]
  2041.   #then
  2042.   #        echo -n "routed "
  2043.   #        ${NET}/routed -q #-g -s
  2044.   #fi
  2045.  
  2046.   # Start the GATEd server.
  2047.   if [ -f ${NET}/gated ]
  2048.   then
  2049.           echo -n "gated "
  2050.           ${NET}/gated
  2051.   fi
  2052.  
  2053.   # Start the RWHO server.
  2054.   if [ -f ${NET}/rwhod ]
  2055.   then
  2056.           echo -n "rwhod "
  2057.           ${NET}/rwhod -t -s
  2058.   fi
  2059.  
  2060.   # Start the U-MAIL SMTP server.
  2061.   if [ -f XXX/usr/lib/umail/umail ]
  2062.   then
  2063.           echo -n "umail "
  2064.           /usr/lib/umail/umail -d7 -bd </dev/null >/dev/null 2>&1 &
  2065.   fi
  2066.  
  2067.   # Start the various INET servers.
  2068.   for server in ${IN_SERV}
  2069.   do
  2070.           if [ -f ${NET}/${server} ]
  2071.           then
  2072.                   echo -n "${server} "
  2073.                   ${NET}/${server}
  2074.           fi
  2075.   done
  2076.  
  2077.   # Start the various SUN RPC servers.
  2078.   if [ -f ${NET}/rpc.portmap ]
  2079.   then
  2080.           if [ -f ${NET}/rpc.ugidd ]
  2081.           then
  2082.                   echo -n "ugidd "
  2083.                   ${NET}/rpc.ugidd -d
  2084.           fi
  2085.           if [ -f ${NET}/rpc.mountd ]
  2086.           then
  2087.                   echo -n "mountd "
  2088.                   ${NET}/rpc.mountd
  2089.           fi
  2090.           if [ -f ${NET}/rpc.nfsd ]
  2091.           then
  2092.                   echo -n "nfsd "
  2093.                   ${NET}/rpc.nfsd
  2094.           fi
  2095.  
  2096.           # Fire up the PC-NFS daemon(s).
  2097.           if [ -f ${NET}/rpc.pcnfsd ]
  2098.           then
  2099.                   echo -n "pcnfsd "
  2100.                   ${NET}/rpc.pcnfsd ${LPSPOOL}
  2101.           fi
  2102.           if [ -f ${NET}/rpc.bwnfsd ]
  2103.           then
  2104.                   echo -n "bwnfsd "
  2105.                   ${NET}/rpc.bwnfsd ${LPSPOOL}
  2106.           fi
  2107.  
  2108.   fi
  2109.   echo network daemons started.
  2110.   # Done!
  2111.  
  2112.  
  2113.   10.3.  Name Resolution.
  2114.  
  2115.   Name Resolution is the process of converting a hostname in the
  2116.   familiar dotted notatiion (e.g. tsx-11.mit.edu) into an IP address
  2117.   which the network software understands. There are two principal means
  2118.   of achieving this in a typical installation, one simple, and one more
  2119.   complex.
  2120.  
  2121.  
  2122.   10.3.1.  /etc/hosts
  2123.  
  2124.   /etc/hosts contains a list of ip addresses and the hostnames they map
  2125.   to. In this way, you can refer to other machines on the network by
  2126.   name, as well as their ip address. Using a nameserver (see section
  2127.   `named') allows you to do the same name->ip address translation
  2128.   automatically. (Running named allows you to run your own nameserver on
  2129.   your linux machine).  This file needs to contain at least an entry for
  2130.   127.0.0.1 with the name localhost. If you're not only using loopback,
  2131.   you need to add an entry for your ip address, with your full hostname
  2132.   (such as loomer.vpizza.com). You may also wish to include entries for
  2133.   your gateways and network addresses.
  2134.  
  2135.   For example, if loomer.vpizza.com has the ip address 128.253.154.32,
  2136.   the /etc/hosts file would contain:
  2137.  
  2138.  
  2139.  
  2140.        # /etc/hosts
  2141.        # List of hostnames and their ip addresses
  2142.        127.0.0.1               localhost
  2143.        128.253.154.32          loomer.vpizza.com loomer
  2144.        # end of hosts
  2145.  
  2146.  
  2147.  
  2148.  
  2149.   Once again you will need to edit this file to suit your own needs. If
  2150.   you're only using loopback, the only line in /etc/hosts should be for
  2151.   127.0.0.1, with both localhost and your hostname after it.
  2152.  
  2153.   Note that in the second line, above, there are two names for
  2154.   128.253.154.32: loomer.vpizza.com and just loomer.  The first name is
  2155.   the full hostname of the system, called the "Fully Qualified Domain
  2156.   Name", and the second is an alias for it. The second allows you to
  2157.   type only rlogin loomer instead of having to type the entire hostname.
  2158.   You should ensure that you put the Fully Qualified Domain Name in the
  2159.   line before the alias name.
  2160.  
  2161.  
  2162.   10.3.2.  named - do I need thee ?
  2163.  
  2164.   `I dub thee ..'
  2165.  
  2166.   named is the nameserver daemon for many unix-like operating systems.
  2167.   It allows your machine to serve the name lookup requests, not only for
  2168.   itself, but also for other machines on the network, that is, if
  2169.   another machine wants to find the address for `goober.norelco.com',
  2170.   and you have this machines address in your named database, then you
  2171.   can service the request and tell other machines what `goobers' address
  2172.   is.
  2173.  
  2174.   Under older implementations of Linux tcp/ip, to create aliases for
  2175.   machine names, (even for your own machine), you had to run named on
  2176.   your Linux machine to do the hostname to IP address conversion. One
  2177.   problem with this is that named is comparitively difficult to set up
  2178.   properly, and maintain.  To solve this problem, a program called
  2179.   hostcvt.build was made available on Linux systems to translate your
  2180.   /etc/hosts file into the many files that make up named database files.
  2181.   However even with this problem overcome, named still uses CPU overhead
  2182.   and causes network traffic.
  2183.  
  2184.   The bottom line is this: You do not need to run named on your Linux
  2185.   system. The SLS instructions will probably tell you to run
  2186.   hostcvt.build to setup named. This is simply unnecessary unless you
  2187.   want to make your Linux system function as a nameserver for other
  2188.   machines, in which case you probably should learn some more about
  2189.   named anyway. When looking up hostnames, your linux machine will first
  2190.   check the /etc/hosts file, and then ask the nameserver out on the net.
  2191.  
  2192.   The only reason you may want to run named would be if:
  2193.  
  2194.  
  2195.   o  You're setting up a network of machines, and need a nameserver for
  2196.      one of them, and don't have a nameserver out on the net somewhere.
  2197.  
  2198.   o  Your network administrators want you to run your Linux system as a
  2199.      nameserver for some reason.
  2200.  
  2201.   o  You have a slow slip connection, and want to run a small cache-only
  2202.      nameserver on your Linux machine so that you don't have to go out
  2203.      on the serial line for every name lookup that occurs. If you're
  2204.      only going to be connecting to a small number of hosts on the net,
  2205.      and you know what their addresses are, then you can put them in
  2206.      your hosts file and not need to query a nameserver at all.
  2207.      Generally namelookup isn't that slow and should work fine over a
  2208.      slip link anyway.
  2209.  
  2210.   o  You want to run a nameserver for fun and excitement.
  2211.  
  2212.   In general, you do NOT need to run named: this means that you can
  2213.   comment it out from your rc.inet2 file, and you don't have to run
  2214.   hostcvt.build. If you want to alias machine names, for example, if you
  2215.   want to refer to loomer.vpizza.com as just loomer, then you can add as
  2216.   alias in /etc/hosts instead. There is no reason to run named unless
  2217.   you have a specific requirement to do so. If you have access to a
  2218.   nameserver, (and your network administrators will tell you its
  2219.   address), and most networks do, then don't bother running named.
  2220.  
  2221.   If you're only using loopback, you can run named and set your
  2222.   nameserver address to 127.0.0.1, but since you are the only machine
  2223.   you can talk to, this would be quite bizzarre, as you'd never need to
  2224.   call it.
  2225.  
  2226.  
  2227.   10.3.3.  /etc/networks
  2228.  
  2229.   The /etc/networks file lists the names and addresses of your own, and
  2230.   other, networks. It is used by the route command, and allows you to
  2231.   specify a network by name, should you so desire.
  2232.  
  2233.   Every network you wish to add a route to using the route command
  2234.   should have an entry in the /etc/networks file, unless you also
  2235.   specify the -net argument in the route command line.
  2236.  
  2237.   Its format is simliar to that of /etc/hosts file above, and an example
  2238.   file might look like:
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.   #
  2246.   # /etc/networks: list all networks that you wish to add route commands
  2247.   #                for in here
  2248.   #
  2249.   default         0.0.0.0         # default route    - recommended
  2250.   loopnet         127.0.0.0       # loopback network - recommended
  2251.   mynet           128.253.154.0   # Example network CHANGE to YOURS
  2252.   #
  2253.   # end of networks
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.   10.3.4.  /etc/host.conf
  2260.  
  2261.   The system has some library functions called the resolver library.
  2262.   This file specifies how your system will lookup host names. It should
  2263.   contain at least the following two lines:
  2264.  
  2265.  
  2266.  
  2267.        order hosts,bind
  2268.        multi on
  2269.  
  2270.  
  2271.  
  2272.  
  2273.   These two lines tell the resolve libraries to first check the
  2274.   /etc/hosts file, and then to ask the nameserver (if one is present).
  2275.   The multi entry allows you to have multiple IP addresses for a given
  2276.   machine name in /etc/hosts.
  2277.  
  2278.   This file comes from the implementation of the resolv+ bind library
  2279.   for Linux. You can find further documentation in the resolv+(8) man
  2280.   page if you have it. If you don't, it can be obtained from:
  2281.  
  2282.   sunsite.doc.ic.ac.uk
  2283.  
  2284.  
  2285.        /computing/comms/tcpip/nameserver/resolv+/resolv+2.1.1.tar.Z
  2286.  
  2287.  
  2288.  
  2289.  
  2290.   This file contains the resolv+.8 man page for the resolver library.
  2291.  
  2292.  
  2293.   10.3.5.  /etc/resolv.conf
  2294.  
  2295.   This file actually configures the system name resolver, and contains
  2296.   two types of entries: The addresses of your nameservers (if any), and
  2297.   the name of your domain, if you have one. If you're running your own
  2298.   nameserver (i.e running named on your Linux machine), then the address
  2299.   of your nameserver is 127.0.0.1, the loopback address.
  2300.  
  2301.   Your domain name is your fully qualified hostname (if you're a
  2302.   registered machine on the Internet, for example), with the hostname
  2303.   component removed.  That is, if your full hostname is
  2304.   loomer.vpizza.com, then your domain name is vpizza.com, without the
  2305.   hostname loomer.
  2306.  
  2307.   For example, if you machine is goober.norelco.com, and has a
  2308.   nameserver at the address 128.253.154.5, then your /etc/resolv.conf
  2309.   file would look like:
  2310.  
  2311.        domain norelco.com
  2312.        nameserver 127.253.154.5
  2313.  
  2314.  
  2315.  
  2316.  
  2317.   You can specify more than one nameserver. Each one must have a
  2318.   nameserver entry in the resolv.conf file.
  2319.  
  2320.   Remember, if you're running on loopback, you don't need a nameserver.
  2321.  
  2322.  
  2323.   10.3.6.  /etc/HOSTNAME
  2324.  
  2325.   This is a new file, it contains the full hostname of your machine with
  2326.   the domain name included. It is used by the hostname command, to save
  2327.   you having to supply the hostname as an argument. For example, the
  2328.   machine above would have the file /etc/HOSTNAME:
  2329.  
  2330.  
  2331.  
  2332.        goober.norelco.com
  2333.  
  2334.  
  2335.  
  2336.  
  2337.   That's all.
  2338.  
  2339.  
  2340.   10.3.7.  Setting your machine's name.
  2341.  
  2342.   After you have all of your network daemons, and all of the network
  2343.   code, up and running, there is one small task that remains to do, and
  2344.   that is to set the hostname for your machine. This is achieved by
  2345.   adding a command to your /etc/rc.local, or your /etc/rc file, after
  2346.   rc.inet2, or your rc.net has been run. You may already have this
  2347.   command in your file, so all you will have to do is modify it to your
  2348.   hostname.
  2349.  
  2350.  
  2351.  
  2352.        # /etc/rc or /etc/rc.local
  2353.         ...
  2354.         ...
  2355.        /bin/hostname -S
  2356.         ...
  2357.         ...
  2358.  
  2359.  
  2360.  
  2361.  
  2362.   This command expects your hostname to be found in /etc/HOSTNAME. If
  2363.   you've opted not to bother with the /etc/HOSTNAME file, then you can
  2364.   use this form:
  2365.  
  2366.  
  2367.  
  2368.  
  2369.        # /etc/rc or /etc/rc.local
  2370.         ...
  2371.         ...
  2372.        /bin/hostname -S loomer.vpizza.com
  2373.         ...
  2374.         ...
  2375.  
  2376.  
  2377.   Note that in some distributions a different hostname program is used,
  2378.   and this will not accept the -S argument, nor does it use the
  2379.   /etc/HOSTNAME file, so you ignore the comment relating to those.
  2380.  
  2381.  
  2382.   10.4.  Other files.
  2383.  
  2384.   There are of course many other files in the /etc directory which you
  2385.   may need to dabble with later on. Instead of going into them here, I'm
  2386.   going to provide the bare minimum to get you on the net. More
  2387.   information is available in Olaf's Network Administration Guide. It
  2388.   picks up where this HOWTO ends, and some more information will be
  2389.   provided in later versions of this document.
  2390.  
  2391.   Once you have all of the files set up, and everthing in the right
  2392.   place, you should be able to reboot you new kernel, and net away to
  2393.   your hearts content.  However I strongly suggest that you keep a
  2394.   bootable copy of your old kernel and possibly even a `recovery disk',
  2395.   in case something goes wrong, so that you can get back in and fix it.
  2396.   You might try HJLu's `single disk boot disk', or `disk1' from an SLS
  2397.   distribution.
  2398.  
  2399.  
  2400.   11.  Advanced Configurations.
  2401.  
  2402.   The configurations above have described how a typical Linux
  2403.   workstation might be configured for normal end-user operation. Some of
  2404.   you will have other requirements which will require slightly more
  2405.   advanced configurations. What follows are examples of some the more
  2406.   common of these.
  2407.  
  2408.  
  2409.   11.1.  PPP - Point to Point Protocol.
  2410.  
  2411.   The Point to Point Protocol is a modern and efficient protocol for
  2412.   conveying multiple protocols, tcp/ip for one, across serial links,
  2413.   that a lot of people use in place of slip. It offers enhanced
  2414.   functionality, error detection and security options. It corrects a
  2415.   number of deficiencies that are found in slip, and is suitable for
  2416.   both asynchronous links and synchronous links alike.
  2417.  
  2418.   An important feature of PPP operation is dynamic address allocation,
  2419.   and this feature will almost certainly be exploited by your PPP
  2420.   server. This feature allows a PPP client, with a specially formatted
  2421.   frame, to request its address from the server. In this way
  2422.   configuration is somewhat less messy than with slip, since this
  2423.   ability to retrieve your address must occur outside of the protocol.
  2424.  
  2425.   The authors of the Linux port are Michael Callahan,
  2426.   <callahan@maths.ox.ac.uk> and  Al Longyear, <longyear@netcom.com>.
  2427.   Most of this information has come from the documentation that
  2428.   accompanies the PPP software. The documentation is quite complete, and
  2429.   will tell you much more than I present here.
  2430.  
  2431.   The Linux PPP code has come out of Alpha testing and is now available
  2432.   as a public release. The 1.0.0 Linux PPP code is based on Paul
  2433.   Mackerras's free PPP for BSD-derivative operating systems. The 1.0.0
  2434.   release is based on version 2.1.1 of the free PPP code.
  2435.  
  2436.   The PPP code comes in two parts. The first is a kernel module which
  2437.   handles the assembly and disassembly of the frames, and the second is
  2438.   a set of protocols called LCP, IPCP, UPAP and CHAP, for negotiating
  2439.   link options, bringing the link into a functioning state and for
  2440.   authentication.
  2441.  
  2442.  
  2443.   11.1.1.  Why would I use PPP in place of SLIP ?
  2444.  
  2445.   You would use PPP in place of SLIP for a few reasons. The most common
  2446.   are:
  2447.  
  2448.  
  2449.      Your Internet Provider supports only PPP
  2450.         The most obvious reason you would use PPP in favour of SLIP is
  2451.         when your Internet Provider supports PPP and not SLIP. Ok, I
  2452.         said it was obvious.
  2453.  
  2454.      You have a normally noisy serial line
  2455.         PPP provides a frame check sequence for each and every frame
  2456.         transmitted, SLIP does not. If you have a noisy serial line, and
  2457.         you are using SLIP, your error correction will be performed end
  2458.         to end, that is between your machine and the destination
  2459.         machine, whereas with PPP the error detection occurs locally,
  2460.         between your machine and the PPP server. This makes for faster
  2461.         recovery from errors.
  2462.  
  2463.      You need to make use of some other feature PPP offers.
  2464.         PPP provides a number of features that SLIP does not. You might
  2465.         for example want to carry not only IP, but also DECNET, or
  2466.         AppleTalk frames over your serial link. PPP will allow you to do
  2467.         this.
  2468.  
  2469.  
  2470.   11.1.2.  Where to obtain the PPP software.
  2471.  
  2472.   The ppp software is available from:
  2473.  
  2474.   sunsite.unc.edu
  2475.  
  2476.  
  2477.        /pub/Linux/system/Networking/serial/ppp-2.1.2a.tar.gz
  2478.  
  2479.  
  2480.  
  2481.  
  2482.   This file contains the kernel source, and the pppd source and binary.
  2483.   Version 1.0.0 is meant for use with kernels 1.0.x and 1.1.x. No
  2484.   support is currently available for Fred's Net-2E kernel.
  2485.  
  2486.  
  2487.   11.1.3.  Installing the PPP software.
  2488.  
  2489.   Installation of the PPP software is fairly straightforward.
  2490.  
  2491.  
  2492.   11.1.3.1.  The kernel driver.
  2493.  
  2494.   Some support for ppp has been built into the kernel for some time.
  2495.   Configuring the kernel is fairly easy, the following should work ok:
  2496.  
  2497.  
  2498.  
  2499.        # cd /usr/src
  2500.        # gzip -dc ppp-2.1.2a.tar.gz | tar xvf -
  2501.        # cp /usr/src/ppp-2.1.2a/linux/ppp.c /usr/src/linux/drivers/net
  2502.        # cp /usr/src/ppp-2.1.2a/pppd/ppp.h /usr/src/linux/include/linux
  2503.  
  2504.  
  2505.  
  2506.  
  2507.   You will then need to uncomment the CONFIG_PPP line in
  2508.   /usr/src/linux/config.in. If you are running a version of the kernel
  2509.   that is 1.1.4 or higher, then you will also need to comment out or
  2510.   delete the macro definition of NET02D in the file
  2511.   /usr/src/linux/drivers/net/ppp.c. If you are running an even more
  2512.   recent version then you make not to make any changes at all.
  2513.  
  2514.   You can then do a make config, select PPP support, and follow with a
  2515.   make dep;make.
  2516.  
  2517.   When you reboot with the new kernel you should see messages at boot
  2518.   time that look something like these:
  2519.  
  2520.  
  2521.  
  2522.        PPP: version 2.1.1 (4 channels)
  2523.        TCP compression code copyright 1989 Regents of the University of California
  2524.        PPP line discipline registered.
  2525.  
  2526.  
  2527.  
  2528.  
  2529.   Now, try looking at the contents of /proc/net/dev. It should look
  2530.   something like this:
  2531.  
  2532.  
  2533.  
  2534.          Inter-|   Receive                  |  Transmit
  2535.           face |packets errs drop fifo frame|packets errs drop fifo colls carrier
  2536.              lo:      0    0    0    0    0        0    0    0    0     0    0
  2537.            ppp0:      0    0    0    0    0        0    0    0    0     0    0
  2538.            ppp1:      0    0    0    0    0        0    0    0    0     0    0
  2539.            ppp2:      0    0    0    0    0        0    0    0    0     0    0
  2540.            ppp3:      0    0    0    0    0        0    0    0    0     0    0
  2541.  
  2542.  
  2543.  
  2544.  
  2545.   This indicates that the kernel driver is installed correctly.
  2546.  
  2547.  
  2548.   11.1.3.2.  pppd
  2549.  
  2550.   If you want to recompile pppd, type make in the pppd subdirectory of
  2551.   the installation.  There will be some warnings when compiling lcp.c,
  2552.   upap.c and chap.c but these are OK.
  2553.  
  2554.   If you want to recompile chat, consult README.linux in the chat
  2555.   directory.
  2556.  
  2557.   To install, type make install in the chat and pppd directories.   This
  2558.   will put chat and pppd binaries in /usr/etc and the pppd.8 manual page
  2559.   in /usr/man/man8.
  2560.  
  2561.   pppd needs to be run as root. You can either make it suid root or just
  2562.   use it when you are root. make install will try to install it suid
  2563.   root, so if you are root when you try to install it, it should work
  2564.   ok.
  2565.  
  2566.  
  2567.   11.1.4.  Configuring and using the PPP software.
  2568.  
  2569.   Like slip, you can configure the PPP software as either a client or a
  2570.   server.  The chat performs a similar function to the dip program in
  2571.   that it is used to automate the dialling and login procedure to the
  2572.   remote machine, unlike dip though, it does not perform the ioctl to
  2573.   convert the serial line into a PPP line. This is performed by the pppd
  2574.   program. pppd can act as either the client or the server. When used as
  2575.   a client, it normally invokes the chat program to perform the
  2576.   connection and login, and then it takes over by performing the ioctl
  2577.   to change the line discipline to ppp and then steps out of the way to
  2578.   let you operate.
  2579.  
  2580.   Please refer to the pppd and chat man pages for more information.
  2581.   Please also refer to the README file that comes with the ppp software,
  2582.   as its description of the operation of these utilities is much more
  2583.   complete than I have described here.
  2584.  
  2585.  
  2586.   11.1.4.1.  Configuring a PPP client by dial-up modem.
  2587.  
  2588.   This is perhaps what most of you will want to do, so it appears first.
  2589.   You would use this configuration when you have a network provider who
  2590.   supports ppp by dialup modem. When you want to establish your
  2591.   connection you simply have to invoke the pppd program with appropriate
  2592.   arguments.
  2593.  
  2594.   The following example might look a little confusing at first, but it
  2595.   is easier to understand if you can see that all it is doing is taking
  2596.   a command line for the chat program as its first argument and then
  2597.   others for itself later.
  2598.  
  2599.  
  2600.  
  2601.        pppd connect 'chat -v "" ATDT5551212 CONNECT "" ogin: ppp word: password'\
  2602.              /dev/cua1 38400 debug crtscts modem defaultroute 192.1.1.17:
  2603.  
  2604.  
  2605.  
  2606.  
  2607.   What this says is:
  2608.  
  2609.  
  2610.   o  Invoke the chat program with the command line:
  2611.  
  2612.  
  2613.        chat -v "" ATDT5551212 CONNECT "" ogin: ppp word: password
  2614.  
  2615.  
  2616.  
  2617.  
  2618.   Which says: Dial 5551212, wait for the `CONNECT' string, transmit a
  2619.   carriage return, wait for the string `ogin:', transmit the string
  2620.   `ppp', wait for the string `word:', transmit the string `password',
  2621.   and quit.
  2622.  
  2623.   o  Use serial device /dev/cua1
  2624.  
  2625.   o  Set its speed to 38400 bps.
  2626.  
  2627.   o  debug means log status messages to syslog
  2628.  
  2629.   o  crtscts means use hardware handshaking to the modem - recommended.
  2630.  
  2631.   o  modem means that pppd will attempt to hang up the call before and
  2632.      after making the call.
  2633.  
  2634.   o  defaultroute instructs pppd to add a routing entry that makes this
  2635.      the default route. In most cases this will be what you want.
  2636.  
  2637.   o  192.1.1.17: says to set the ppp interfaces address to 192.1.1.17.
  2638.      This argument normally looks like x.x.x.x:y.y.y.y, where x.x.x.x is
  2639.      your ip address, and y.y.y.y is the ip address of the server. If
  2640.      you leave off the server's address, pppd will ask for it, and
  2641.      x.x.x.x will be set to your machines ip address.
  2642.  
  2643.   Please refer to the pppd and chat man pages for more information.
  2644.   Please also refer to the README file that comes with the ppp software,
  2645.   as its description of the above is much more complete than I have
  2646.   described here.
  2647.  
  2648.  
  2649.   11.1.4.2.  Configuring a PPP client via a leased line.
  2650.  
  2651.   Configuring a PPP client via a leased line is almost as
  2652.   straightforward as for configuring slip with slattach. You will still
  2653.   use the pppd program, but since you won't need to establish the modem
  2654.   link the arguments to the chat program can be much simpler.
  2655.  
  2656.   The example I'm presenting here assumes that the ppp server doesn't
  2657.   require any special login procedure. I do this because every login
  2658.   procedure will be different, and if you are simply running a local
  2659.   connection then it is possible that you might have it set up this way.
  2660.  
  2661.  
  2662.  
  2663.        pppd connect 'echo connecting...' defaultroute noipdefault debug \
  2664.              kdebug 2 /dev/cua0 9600
  2665.  
  2666.  
  2667.  
  2668.  
  2669.   This will echo a message to your screen, and set your default route
  2670.   via the ppp interface. The noipdefault argument instructs the pppd
  2671.   program to request the address to use for this device from the server.
  2672.   Debug messages will go to syslog. The kdebug 2 argument causes the
  2673.   debug messages to be set to level 2, this will give you slightly more
  2674.   information on what is going on. It will use /dev/cua0 at 9600 bps.
  2675.  
  2676.   If your ppp server does require some sort of login procedure, you can
  2677.   easily use the chat program as in the example for the dialup server to
  2678.   perform that function for you.
  2679.  
  2680.   Please refer to the pppd and chat man pages for more information.
  2681.   Please also refer to the README file that comes with the ppp software,
  2682.   as its description of the above is much more complete than I have
  2683.   described here.
  2684.  
  2685.  
  2686.   11.1.4.3.  Configuring a PPP server.
  2687.  
  2688.   Configuring a PPP server is similar to establishing a slip server.
  2689.   You can create a special `ppp' account, which uses an executable
  2690.   script as its login shell. The /etc/passwd entry might look like:
  2691.  
  2692.  
  2693.  
  2694.        ppp:EncPasswd:102:50:PPP client login:/tmp:/etc/ppp/ppplogin
  2695.  
  2696.  
  2697.  
  2698.  
  2699.   and the /etc/ppp/ppplogin script might look like:
  2700.  
  2701.  
  2702.  
  2703.        #!/bin/sh
  2704.        exec /usr/etc/pppd passive :192.1.2.23
  2705.  
  2706.  
  2707.   The address that you provide will be the address that the calling
  2708.   machine will be assigned.
  2709.  
  2710.   Naturally, if you want multiple users to have simultaneous access you
  2711.   would have to create a number of startup scripts and individual
  2712.   accounts for each to use, as you can only put one ip address in each
  2713.   script.
  2714.  
  2715.  
  2716.   11.1.5.  Where to obtain more information on PPP, or report bugs.
  2717.  
  2718.   Most discussion on PPP for Linux takes place on the PPP mailing list.
  2719.  
  2720.   To join the Linux PPP channel on the mail list server, send mail to:
  2721.  
  2722.  
  2723.  
  2724.        linux-activists@niksula.hut.fi
  2725.  
  2726.        with the line:
  2727.  
  2728.        X-Mn-Admin: join PPP
  2729.  
  2730.        at the top of the message body (not the subject line).
  2731.  
  2732.  
  2733.  
  2734.  
  2735.   Please remember that when you are reporting bugs or problems you
  2736.   should include as much information relevant to the problem as you can
  2737.   to assist those that will help you understand your problem.
  2738.  
  2739.   You might also like to check out:
  2740.  
  2741.   RFCS 1548, 1331, 1332, 1333, and 1334. These are the definitive
  2742.   documents for PPP.
  2743.  
  2744.   W. Richard Stevens also describes PPP in his book `TCP/IP Illustrated
  2745.   Volume 1', (Addison-Wessley, 1994, ISBN 0-201-63346-9).
  2746.  
  2747.  
  2748.   11.2.  Configuring Linux as a Slip Server.
  2749.  
  2750.   If you have a machine that is perhaps network connected, that you'd
  2751.   like other people be able to dial into, and provide network services,
  2752.   then you will need to configure your machine as a server. If you want
  2753.   to use slip as the serial line protocol, then currently you have two
  2754.   options as to how to configure your Linux machine as a slip server. I
  2755.   will present a summary of both.
  2756.  
  2757.  
  2758.   11.2.1.  Slip Server using sliplogin
  2759.  
  2760.   sliplogin is a program that you can use in place of the normal login
  2761.   shell for slip users that converts the terminal line into a slip line.
  2762.   The caller will login as per the standard login process, entering
  2763.   their username and password, but instead of being presented with a
  2764.   shell after their login, sliplogin is executed which searches its
  2765.   configuration file (/etc/slip.hosts) for an entry with a login name
  2766.   that matches that of the caller. If it locates one, it configures the
  2767.   line as an 8bit clean line, and uses an ioctl call to convert the line
  2768.   discipline to slip. When this process is complete, the last stage of
  2769.   configuration takes place, where sliplogin invokes a shell script
  2770.   which configures the slip interface with the relevant ip address,
  2771.   netmask and sets appropriate routing in place. This script is usually
  2772.   called /etc/slip.login, but in a similar manner to getty, if you have
  2773.   certain callers that require special initialisation, then you can
  2774.   create configuration scripts called /etc/slip.login.loginname that
  2775.   will be run instead of the default.
  2776.  
  2777.  
  2778.   11.2.1.1.  Where to get sliplogin
  2779.  
  2780.   sliplogin can be obtained from:
  2781.  
  2782.   sunsite.unc.edu
  2783.  
  2784.  
  2785.        /pub/Linux/system/Network/serial/sliplogin.tar.gz
  2786.  
  2787.  
  2788.  
  2789.  
  2790.   The tar file contains both source, precompiled binaries and a man
  2791.   page.  To install the binaries into your /sbin directory, and the man
  2792.   page into section 8, do the following:
  2793.  
  2794.  
  2795.  
  2796.        # cd /usr/src
  2797.        # gzip -dc .../sliplogin.tar.gz | tar xvf -
  2798.        # cd src
  2799.        # make install
  2800.  
  2801.  
  2802.  
  2803.  
  2804.   If you want to recompile the binaries before installation, add a make
  2805.   clean before the make install. If you want to install the binaries
  2806.   somewhere else, you will need to edit the Makefile install rule.
  2807.  
  2808.  
  2809.   11.2.1.2.  Configuring /etc/passwd for Slip hosts.
  2810.  
  2811.   You need to create some special logins for Slip callers in your
  2812.   /etc/passwd file. A convention commonly followed is to use the
  2813.   hostname of the calling host with a capital `S' prefixing it. So, for
  2814.   example, if the calling host is called radio then you would create a
  2815.   /etc/passwd entry that looked like:
  2816.  
  2817.  
  2818.  
  2819.        Sradio:FvKurok73:1427:1:radio slip login:/tmp:/sbin/sliplogin
  2820.  
  2821.  
  2822.  
  2823.  
  2824.   Note: the caller doesn't need any special home directory, as they will
  2825.   not be presented with a shell from this machine, so /tmp is a good
  2826.   choice.  Also note that sliplogin is used in place of the normal login
  2827.   shell.
  2828.  
  2829.  
  2830.   11.2.1.3.  Configuring /etc/slip.hosts
  2831.  
  2832.   The /etc/slip.hosts file is the file that sliplogin searches for
  2833.   entries matching the login name to obtain configuration details for
  2834.   this caller. It is this file where you specify the ip address and
  2835.   netmask that will be assigned to the caller, and configured for their
  2836.   use. A sample entry for host `radio' might look like:
  2837.  
  2838.  
  2839.        Sradio    `hostname`    radio    <netmask>    <opt1>    <opt2>
  2840.  
  2841.  
  2842.  
  2843.  
  2844.   The /etc/slip.hosts file entries are:
  2845.  
  2846.  
  2847.   1. the login name of the caller.
  2848.  
  2849.   2. ip address of the server machine, ie this machine.
  2850.  
  2851.   3. ip address that the caller will be assigned.
  2852.  
  2853.   4. the netmask assigned to the calling machine in hexadecimal notation
  2854.      eg 0xffffff00 for a Class C network mask.
  2855.  
  2856.   5. optional parameters to enable/disable compression and other
  2857.      features.
  2858.  
  2859.   Note: You can use either hostnames or IP addresses in dotted decimal
  2860.   notation for fields 2 and 3. If you use hostnames then those hosts
  2861.   must be resolvable, that is, your machine must be able to locate an ip
  2862.   address for those hostnames, otherwise the script will fail when it is
  2863.   called. You can test this by trying trying to telnet to the hostname,
  2864.   if you get the `Trying nnn.nnn.nnn...'  message then your machine has
  2865.   been able to find an ip address for that name.  If you get the message
  2866.   `Unknown host', then it has not. If not, either use ip addresses in
  2867.   dotted decimal notation, or fix up your name resolver configuration.
  2868.  
  2869.   The most commonly used optional paramaters for the opt1 and opt2
  2870.   fields are:
  2871.  
  2872.  
  2873.      normal
  2874.         to enable normal uncompressed slip.
  2875.  
  2876.      compress
  2877.         to enable van Jacobsen header compression (cslip)
  2878.  
  2879.   Naturally these are mutually exclusive, you can use one or the other.
  2880.   For more information on the other options available, refer to the man
  2881.   pages.
  2882.  
  2883.  
  2884.   11.2.1.4.  Configuring the /etc/slip.login file.
  2885.  
  2886.   After sliplogin has searched the /etc/slip.hosts and found a matching
  2887.   entry, it will attempt to execute the /etc/slip.login file to actually
  2888.   configure the slip interface with its ip address and netmask.
  2889.  
  2890.   The sample /etc/slip.login file supplied with the sliplogin package
  2891.   looks like this:
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.   #!/bin/sh -
  2906.   #
  2907.   #       @(#)slip.login  5.1 (Berkeley) 7/1/90
  2908.   #
  2909.   # generic login file for a slip line.  sliplogin invokes this with
  2910.   # the parameters:
  2911.   #      1        2         3        4          5         6     7-n
  2912.   #   slipunit ttyspeed loginname local-addr remote-addr mask opt-args
  2913.   #
  2914.   /sbin/ifconfig $1 $4 pointopoint $5 mtu 1500 -trailers up
  2915.   /sbin/route add $5
  2916.   exit 0
  2917.  
  2918.  
  2919.  
  2920.  
  2921.   You will note that this script simply uses the ifconfig and route
  2922.   commands to configure the slip device with its ipaddress, remote ip
  2923.   address and netmask, and creates a route for the remote address via
  2924.   the slip device. Just the same as you would if you were using the
  2925.   slattach command.
  2926.  
  2927.  
  2928.   11.2.1.5.  Configuring the /etc/slip.logout file.
  2929.  
  2930.   When the call drops out, you want to ensure that the serial device is
  2931.   restored to its normal state so that future callers will be able to
  2932.   login correctly.  This is achieved with the use of the
  2933.   /etc/slip.logout file. It is quite simple, and again, I'll present the
  2934.   sample included in the sliplogin package.
  2935.  
  2936.  
  2937.  
  2938.        #!/bin/sh -
  2939.        #
  2940.        #               slip.logout
  2941.        #
  2942.        /sbin/ifconfig $1 down
  2943.        /sbin/route del $5
  2944.        exit 0
  2945.  
  2946.  
  2947.  
  2948.  
  2949.   All it does is `down' the interface and delete the manual route
  2950.   previously created.
  2951.  
  2952.  
  2953.   11.2.2.  Slip Server using dip.
  2954.  
  2955.   Let me start by saying that some of the information below came from
  2956.   the dip man pages, where how to run Linux as a slip server is briefly
  2957.   documented.
  2958.  
  2959.   To configure Linux as a slip server, you need to create some special
  2960.   slip accounts for users, where dip (in slave mode) is used as the
  2961.   login shell. Fred suggests that he has a convention of having all of
  2962.   his slip accounts begin with a capital `S', eg `Sfredm'.
  2963.  
  2964.   Because the login program won't accept arguments to the login shell,
  2965.   you will need to create a small program that looks like the following:
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.   /* dip-i.c - from a mail message of Karl kkeyte@esoc.bitnet */
  2972.   int main()
  2973.   {
  2974.      execlp("dip", "dip", "-i", (char *) 0);
  2975.   }
  2976.  
  2977.  
  2978.  
  2979.  
  2980.   Compile it with: gcc -O dip-i.c -o dip-i
  2981.  
  2982.   Give it permissions 555. I recommend calling it /usr/bin/dip-i as
  2983.   shown below.
  2984.  
  2985.   A sample /etc/passwd entry for a slip user looks like:
  2986.  
  2987.  
  2988.  
  2989.        Sfredm:ij/SMxiTlGVCo:1004:10:UUNET:/tmp:/usr/bin/dip-i
  2990.        ^^         ^^        ^^  ^^   ^^    ^^   ^^
  2991.        |          |         |   |    |     |    \__ shell program running
  2992.        |          |         |   |    |     |         dip -i as login shell
  2993.        |          |         |   |    |     \_______ Home directory
  2994.        |          |         |   |    \_____________ User Full Name
  2995.        |          |         |   \__________________ User Group ID
  2996.        |          |         \______________________ User ID
  2997.        |          \________________________________ Encrypted User Password
  2998.        \___________________________________________ Slip User Login Name
  2999.  
  3000.  
  3001.  
  3002.  
  3003.   After the user logs in, the login(1) program, if it finds and verifies
  3004.   the user ok, will execute the shell program dip-i which will execute
  3005.   the dip command in input mode (-i). dip now scans the
  3006.   /etc/net/diphosts file for an entry for the given user name.
  3007.   Therefore, each slip user must also have an entry in
  3008.   /etc/net/diphosts.
  3009.  
  3010.   You will have to re-read section `Proxy Arp' to arrange for your
  3011.   machine to proxy arp for the slip users who will be using your system
  3012.   if you want them to have access to any network that your server
  3013.   machine might be connected to.
  3014.  
  3015.  
  3016.   11.2.2.1.  Configuring /etc/net/diphosts
  3017.  
  3018.   /etc/net/diphosts is used by dip to lookup preset configurations for
  3019.   remote hosts. These remote hosts might be users dialing into your
  3020.   linux machine, or they might be for machines that you dial into with
  3021.   your linux machine.
  3022.  
  3023.   The general format for /etc/net/diphosts is as follows:
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.   Suwalt::145.71.34.1:SLIP uwalt:CSLIP,1006
  3038.    ^    ^  ^            ^         ^     ^
  3039.    |    |  |            |         |     \___ MTU
  3040.    |    |  |            |         \_________ protocol (SLIP, CSLIP,
  3041.    |    |  |            |                    KISS)
  3042.    |    |  |            \___________________ comment field
  3043.    |    |  \________________________________ IP address of the other
  3044.    |    |                                    side, or host.domain.name
  3045.    |    \___________________________________ unused (compat. with passwd)
  3046.    \________________________________________ login name (as returned by
  3047.                                              getpwuid(getuid()))
  3048.  
  3049.  
  3050.  
  3051.  
  3052.   An example /etc/net/diphosts entry for a remote slip user might be:
  3053.  
  3054.  
  3055.  
  3056.        Sfredm::145.71.34.1:SLIP uwalt:SLIP,296
  3057.  
  3058.  
  3059.  
  3060.  
  3061.   which specifies a slip link with MTU of 296, or
  3062.  
  3063.  
  3064.  
  3065.        Sfredm::145.71.34.1:SLIP uwalt:CSLIP,1006
  3066.  
  3067.  
  3068.  
  3069.  
  3070.   which specifies a cslip-capable link with MTU of 1006.
  3071.  
  3072.   When a user logs in, they will receive a normal login, and password
  3073.   prompt, at which they should enter their slip-login userid and
  3074.   password. If they check out ok, then the user will see no special
  3075.   messages, they should just change into slip mode at their end, and
  3076.   then they should be able to connect ok, and be configured with the
  3077.   parameters from the diphosts file.
  3078.  
  3079.  
  3080.   11.3.  Using the Automounter Daemon - AMD.
  3081.  
  3082.   This section has been supplied by Mitch DSouza, and I've included it
  3083.   with minimal editing, as he supplied it. Thanks Mitch.
  3084.  
  3085.  
  3086.   11.3.1.  What is an automounter, and why would I use one ?
  3087.  
  3088.   An automounter provides a convenient means of mounting filesystems on
  3089.   demand, i.e. when requried. This will reduce both the server and the
  3090.   client load, and provides a great deal of flexibility even with non-
  3091.   NFS mounts. It also offers a redundancy mechanism whereby a mount
  3092.   point will automatically switch to a secondary server should a primary
  3093.   one be unavailable. A rather useful mount called the union mount gives
  3094.   the automounter the ability to merge the contents of multiple
  3095.   directories into a single directory. The documentation msut be read
  3096.   thoroughly to make full use of its extensive capabilities.
  3097.  
  3098.   A few important points must be remembered - (in no particular order):
  3099.  
  3100.  
  3101.   o  amd maps are not compatible with Sun maps, which in turn are not
  3102.      compatible with HP maps ad infinitum. The point here however is
  3103.      that amd is freely available and compatible with all the systems
  3104.      mentioned above and more, thus giving you the ability to share maps
  3105.      if amd is installed throughout your network. Mitch uses it with a
  3106.      mixture of Linux/Dec/NeXt/Sun machines.
  3107.  
  3108.   o  Sun automount maps can be converted to amd style maps by using the
  3109.      perl script in the contrib directory - automount2amd.pl.
  3110.  
  3111.   o  You must have the portmapper running before starting amd.
  3112.  
  3113.   o  UFS mounts do not timeout.
  3114.  
  3115.   o  UFS mounts, in the case of Linux only, have been extended to deal
  3116.      with all varieties of native filesystems (i.e. minix, ext, ext2,
  3117.      xiafs ...) with the default being minix. This undocumented feature
  3118.      is accessed in the opts option like:
  3119.  
  3120.  
  3121.         ..., opts:=type=msdos,conv=auto
  3122.  
  3123.  
  3124.  
  3125.  
  3126.   o  Do not mount over existing directories unless you use a direct
  3127.      automount option, otherwise it is like mounting your disk on /home
  3128.      when some user directory is /home/fred.
  3129.  
  3130.   o  Always turn on full logging with the `-x all' option to amd if you
  3131.      have any troubles. Check also what the command:
  3132.  
  3133.  
  3134.        % amq -ms
  3135.  
  3136.  
  3137.  
  3138.  
  3139.   reports, as it will indicate problems as they occur.
  3140.  
  3141.   o  GNU getopt() is too clever for its own good sometimes. You should
  3142.      always use `--' before the non-options e.g.
  3143.  
  3144.  
  3145.        # /etc/amd -x all -l syslog -a /amd -- /net /etc/amd.net
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.   11.3.2.  Where to get AMD, the automounter daemon.
  3152.  
  3153.   amd can be obtained from:
  3154.  
  3155.   sunsite.unc.edu
  3156.  
  3157.  
  3158.        /pub/Linux/system/Misc/mount/amd920824upl67.tar.gz
  3159.  
  3160.  
  3161.  
  3162.  
  3163.   This contains ready-to-run binaries, full sources and documentation in
  3164.   texinfo format.
  3165.  
  3166.  
  3167.  
  3168.  
  3169.   11.3.3.  An example AMD configuration.
  3170.  
  3171.   You do not configure the automounter from the /etc/fstab file, which
  3172.   you will already be using to contain information about your
  3173.   fileystems, instead it is command line driven.
  3174.  
  3175.   To mount two nfs filesystems using your /etc/fstab file you would use
  3176.   two entries that looked like:
  3177.  
  3178.  
  3179.  
  3180.        server-1:/export/disk  /nfs/server-1  nfs  defaults
  3181.        server-2:/export/disk  /nfs/server-2  nfs  defaults
  3182.  
  3183.  
  3184.  
  3185.  
  3186.   i.e. you were nfs mounting server-1 and server-2 on your linux disk on
  3187.   the /nfs/server-1 and /nfs/server-2 directories.
  3188.  
  3189.   After commenting out, or deleting the above lines from your /etc/fstab
  3190.   file, you could amd to perform the same task with the following
  3191.   syntax:
  3192.  
  3193.  
  3194.  
  3195.        /etc/amd -x all -l syslog -a /amd -- /nfs /etc/amd.server
  3196.        |      | |    | |       | |     |  | |  | |             |
  3197.        |      | |    | |       | |     |  | |  | |             |
  3198.        `------' `----' `-------' `-----' -' `--' `-------------'
  3199.         |        |      |         |      |   |    |
  3200.         (1)      (2)    (3)       (4)    (5) (6)  (7)
  3201.  
  3202.  
  3203.  
  3204.  
  3205.   Where:
  3206.  
  3207.  
  3208.   1. The full amd binary path (obviously optional) depending on your
  3209.      $PATH setting, so just `amd' may be specified here.
  3210.  
  3211.   2. `-x all' means turn full logging on. Read the documentation for the
  3212.      other logging levels
  3213.  
  3214.   3. `-l syslog' means log the message via the syslog daemon. This could
  3215.      mean put it to a file, dump it, or pass it, to an unused tty
  3216.      console. This (syslog) can be changed to the name of a file, i.e.
  3217.      `-l foo' will record to a file called foo.
  3218.  
  3219.   4. `-a /amd' means use the /amd directory as a temporary place for
  3220.      automount points. This directory is created automatically by amd
  3221.      and should be removed before starting amd in your /etc/rc scripts.
  3222.  
  3223.   5. `--' means tell getopt() to stop attempting to parse the rest of
  3224.      the command line for options. This is especially useful when
  3225.      specifying the `type:=' options on the command line, otherwise
  3226.      getopt() tries to decode it incorrectly.
  3227.  
  3228.   6. `/nfs' is the real nfs mount point. Again this is automatically
  3229.      created and should not generally contain subdirectories unless the
  3230.      `type:=direct' option is used.
  3231.  
  3232.   7. The amd map (i.e. a file) named `amd.server' contains the lines:
  3233.  
  3234.  
  3235.   # /etc/amd.server
  3236.   /defaults    opts:=rw;type:=nfs
  3237.   server-1     rhost:=server-1;rfs:=/export/disk
  3238.   server-2     rhost:=server-2;rfs:=/export/disk
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.   Once started and successfully running, you can query the status of the
  3245.   mounts with the command:
  3246.  
  3247.  
  3248.  
  3249.        % amq -ms
  3250.  
  3251.  
  3252.  
  3253.  
  3254.   Now if you say:
  3255.  
  3256.  
  3257.  
  3258.        % ls /nfs
  3259.  
  3260.  
  3261.  
  3262.  
  3263.   you should see no files. However the command:
  3264.  
  3265.  
  3266.  
  3267.        % ls /nfs/server-1
  3268.  
  3269.  
  3270.  
  3271.  
  3272.   will mount the host `server-1' automatically. voila! amd is running.
  3273.   After the default timeout has expired, this will automatically be
  3274.   unmounted. Your /etc/password file could contain entries like:
  3275.  
  3276.  
  3277.  
  3278.         ...
  3279.        linus:EncPass:10:0:God:/nfs/server-1/home/linus:/bin/sh
  3280.        mitch:EncPass:20:10:Mitch DSouza:/nfs/server-1/home/mitch:/bin/tcsh
  3281.        matt:EncPass:20:10:Matt Welsh:/nfs/server-1/home/matt:/bin/csh
  3282.  
  3283.  
  3284.  
  3285.  
  3286.   which would mean that when Linus, Matt, or Mitch are logged in, their
  3287.   home directory will be remotely mounted from the appropriate server,
  3288.   and umounted when they log out.
  3289.  
  3290.  
  3291.   12.  Experimental and Developmental modules.
  3292.  
  3293.   There are a number of people developing new features and modules for
  3294.   the Linux networking code. Some of these are in quite an advanced
  3295.   state (read working), and it is these that I intend to include in this
  3296.   section until they are standard release code, when they will be moved
  3297.   forward.
  3298.  
  3299.  
  3300.  
  3301.   12.1.  AX.25 - A protocol used by Amateur Radio Operators.
  3302.  
  3303.   The AX.25 protocol is used by Amateur Radio Operators worldwide.  It
  3304.   offers both connected and connectionless modes of operation, and is
  3305.   used either by itself for point-point links, or to carry other
  3306.   protocols such as tcp/ip and netrom.
  3307.  
  3308.   It is similar to X.25 level 2 in structure, with some extensions to
  3309.   make it more useful in the amateur radio environment.
  3310.  
  3311.   Alan Cox has developed some kernel based AX.25 software support for
  3312.   Linux and these are available in ALPHA form for you to try. Alan's
  3313.   code supports both KISS based TNC's (Terminal Node Controllers), and
  3314.   the Z8530 SCC driver.
  3315.  
  3316.   The User programs contain a P.M.S. (Personal Message System), a beacon
  3317.   facility, a line mode connect program, and `listen' an example of how
  3318.   to capture all AX.25 frames at RAW interface level.
  3319.  
  3320.   Be sure to read /usr/local/ax25/README as it contains more complete
  3321.   information regarding this software.
  3322.  
  3323.  
  3324.   12.1.1.  Where to obtain the AX.25 software.
  3325.  
  3326.   The AX.25 software is available from:
  3327.  
  3328.   sunacm.swan.ac.uk
  3329.  
  3330.  
  3331.        /pub/misc/Linux/Radio/*
  3332.  
  3333.  
  3334.  
  3335.  
  3336.   You will find a number of directories, each containing different
  3337.   versions of the code. Since it is closely linked with the kernel code,
  3338.   you will need to ensure that you choose the version appropriate for
  3339.   the kernel version you are running. The following table shows the
  3340.   mapping between the two:
  3341.  
  3342.  
  3343.  
  3344.        AX25007                 Prehistoric
  3345.        AX25010                 Obsolete
  3346.        AX25012                 for release 1.0.* kernels and higher
  3347.        AX25016                 for release 1.1.5 kernels
  3348.        AX25017                 for release 1.1.6 kernels
  3349.        AX25018
  3350.        AX25021
  3351.        AX25022                 for release 1.1.28 kernels
  3352.  
  3353.  
  3354.  
  3355.  
  3356.   In each directory you will find at least two files, one called
  3357.   something like krnl022.tgz, and the other called something like
  3358.   user022.tgz.  These are the kernel software, and the user programs
  3359.   respectively.
  3360.  
  3361.  
  3362.   12.1.2.  Installing the AX.25 software.
  3363.  
  3364.   The software comes in two parts, the kernel drivers, and the user
  3365.   programs.
  3366.  
  3367.   12.1.2.1.  The kernel drivers.
  3368.  
  3369.   To install the kernel drivers, do the following:
  3370.  
  3371.  
  3372.  
  3373.        # cd /usr/src
  3374.        # gzip -dc krnl022.tgz | tar xvf -
  3375.  
  3376.  
  3377.  
  3378.  
  3379.   you will need to uncomment the CONFIG_AX25 define in the
  3380.   /usr/src/linux/config.in file.
  3381.  
  3382.   You should then:
  3383.  
  3384.  
  3385.  
  3386.        # cd /usr/src/linux
  3387.        # make config
  3388.        # make dep;make
  3389.  
  3390.  
  3391.  
  3392.  
  3393.   Be sure to answer `yes' when you are asked if you should include the
  3394.   AX.25 support in the make config step. You will also need to answer
  3395.   `yes' to inluding SLIP if you want the AX.25 code to support a KISS
  3396.   TNC.
  3397.  
  3398.  
  3399.   12.1.2.2.  The user programs.
  3400.  
  3401.   To install the user programs you should try:
  3402.  
  3403.  
  3404.  
  3405.        # cd /
  3406.        # gzip -dc user022.tgz | tar xvvof -
  3407.  
  3408.  
  3409.  
  3410.  
  3411.   You should then:
  3412.  
  3413.  
  3414.  
  3415.        # cd /usr/local/ax25/src
  3416.        # make install
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.   12.1.3.  Configuring and using the AX.25 software.
  3423.  
  3424.   Configuring an AX.25 port is very similar to configuring a slip
  3425.   device.  The AX.25 software has been designed to work with a TNC in
  3426.   kiss mode. You will need to have the TNC preconfigured and connected.
  3427.  
  3428.   You use the axattach program in much the same way as you would use the
  3429.   slattach program. For example:
  3430.  
  3431.  
  3432.  
  3433.   # /usr/local/ax25/bin/axattach -s 4800 /dev/cua1 VK2KTJ &
  3434.  
  3435.  
  3436.  
  3437.  
  3438.   would configure your /dev/cua1 serial device to be a kiss interface at
  3439.   4800 bps, with the hardware address VK2KTJ.
  3440.  
  3441.   You would then use the ifconfig program to configure the ip address
  3442.   and netmask as for an ethernet device:
  3443.  
  3444.  
  3445.  
  3446.        # /sbin/ifconfig sl0 44.136.8.5
  3447.        # /sbin/ifconfig sl0 netmask 255.255.255.0
  3448.        # /sbin/ifconfig sl0 broadcast 44.136.8.255
  3449.        # /sbin/ifconfig sl0 arp mtu 257 up
  3450.  
  3451.  
  3452.  
  3453.  
  3454.   To test it out, try the following:
  3455.  
  3456.  
  3457.  
  3458.        /usr/local/ax25/bin/call VK2DAY via VK2RVT
  3459.  
  3460.  
  3461.  
  3462.  
  3463.   The call program is a linemode terminal program for making ax.25
  3464.   calls. It recognises lines that start with ` ' as command lines.  The
  3465.   ` .' command will close the connection.
  3466.  
  3467.   You also need to configure some items such as the window to use. This
  3468.   necessitates editing only one file. Edit the /usr/local/ax25/etc/ports
  3469.   file. This is an ascii file containing one line for each AX.25 port.
  3470.   You must have the entries in this file in the same order as you
  3471.   configure your AX.25 interfaces.
  3472.  
  3473.   The format is as follows:
  3474.  
  3475.  
  3476.  
  3477.        callsign baudrate window frequency
  3478.  
  3479.  
  3480.  
  3481.  
  3482.   At this stage not much of this information is used, it will be picked
  3483.   up and used in later developments.
  3484.  
  3485.   I haven't had a chance to try this code out yet. Please refer to the
  3486.   man pages in /usr/local/ax25/man and the README file in
  3487.   /usr/local/ax25 for more information.
  3488.  
  3489.  
  3490.   12.2.  Z8530 SCC driver.
  3491.  
  3492.   The Zilog Z8530 SCC provides Synchronous/Asynchronous, HDLC, NRZI
  3493.   encoding and other capabilities. There are a number of peripheral
  3494.   cards that use the Z850 as the basis of their design. A driver has
  3495.   been written by Joerg Reuter, <dl1bke@melaten.ihf.rwth-aachen.de>, and
  3496.   is available on:
  3497.  
  3498.  
  3499.   ftp.ucsd.edu
  3500.  
  3501.  
  3502.        /hamradio/packet/tcpip/incoming/sccdrv-1.4a.dl1bke.tar.gz
  3503.  
  3504.  
  3505.  
  3506.  
  3507.   Please read the README file that accompanies the driver for more
  3508.   details.
  3509.  
  3510.  
  3511.   12.3.  Ottawa PI/PI2 card driver.
  3512.  
  3513.   The Ottawa PI card is a Z8530 SCC based card for IBM PC type machines
  3514.   that is in common usage by Amateur Radio operators worldwide. While it
  3515.   is most commonly used by Amateur Radio Operators, it could be pressed
  3516.   into service in other fields where it is desirable to have the
  3517.   features of a Z8530. It supports a high speed half duplex (single DMA
  3518.   channel) port, and a low speed (<19.2kbps interrupt driven) full
  3519.   duplex port. The PI2 is a new version of the card that supports an on
  3520.   board radio modem, and improved hardware design.
  3521.  
  3522.   A driver for this card has been written by David Perry,
  3523.   <dp@hydra.carleton.edu>, and is available from:
  3524.  
  3525.   hydra.carleton.ca
  3526.  
  3527.  
  3528.        /pub/hamradio/packet/tcpip/linux/pi2-0.5ALPHA.tgz
  3529.  
  3530.  
  3531.  
  3532.  
  3533.   Please read the README file that accompanes the driver for more
  3534.   details.
  3535.  
  3536.  
  3537.   12.4.  NIS - Sun Network Information System.
  3538.  
  3539.   There are in fact two NIS implementations being distributed. Firstly
  3540.   there is a rudimentary implementation in the standard libc ditribution
  3541.   which however requires binding to servers via ypbind before use.  A
  3542.   more clean implementation tending towards the NIS+ implementation is
  3543.   called NYS, is written by Peter Eriksson, <pen@lysator.liu.se> and is
  3544.   available from:
  3545.  
  3546.   ftp.funet.fi
  3547.  
  3548.  
  3549.        /pub/OS/Linux/BETA/NYS/nys-0.26.tar.gz
  3550.  
  3551.  
  3552.  
  3553.  
  3554.   An NIS style server can be retrieved from:
  3555.  
  3556.   ftp.funet.fi
  3557.  
  3558.  
  3559.        /pub/OS/Linux/BETA/NYS/ypserv-0.5.tar.gz
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.   Check there are no newer versions, as this information might now be
  3566.   slightly dated.
  3567.  
  3568.   Both of these are fully functional and they have been used extensively
  3569.   with no troubles to query Sun servers for NIS information like
  3570.   passwd/hosts/group etc.  and don't require binding to arbitrary
  3571.   servers. In fact they allow you to specify servers for services and
  3572.   have the ability to select a yp/dns/file option for name/passwd/etc.
  3573.   resolution of specific services. They are extremely easy to set up,
  3574.   and recommended for client machines integrating into larger networks.
  3575.  
  3576.   Clearly your network daemons and clients need to be recompiled to link
  3577.   with the shared library libnsl.so to make use of the YP facilities.
  3578.   This is fairly trivial and an NYS package of all network clients and
  3579.   daemons is currently being compiled.
  3580.  
  3581.   If you have more detailed information on NIS, please email me.
  3582.  
  3583.  
  3584.   12.5.  snmp agent.
  3585.  
  3586.   There is an experimental snmp agent for linux, ported by Erik
  3587.   Schoenfelder, <schoenfr@ibr.cs.tu-bs.de>.
  3588.  
  3589.   It is available from:
  3590.  
  3591.   ftp.ibr.cs.tu-bs.de
  3592.  
  3593.  
  3594.        /pub/local/cmu-snmp2.1.2l2.tar.gz
  3595.  
  3596.  
  3597.  
  3598.  
  3599.   Please read the file called cmu-snmp2.1.2l2.README, as it contains
  3600.   information that you will need to know about the package.
  3601.  
  3602.   This package provides a nearly complete MIB-II variable set. At this
  3603.   stage though, you can only read variables, not set them.
  3604.  
  3605.   nstat.tar.gz contains a formatter of the output from /proc/net/snmp
  3606.   called nstat.
  3607.  
  3608.   You will need to be running either a new version kernel, or apply
  3609.   patches to your kernel source. Details are in the README file.
  3610.  
  3611.  
  3612.   12.6.  Experimental ARCNet driver
  3613.  
  3614.   There has been a number of people looking for a driver for ARCNet
  3615.   cards.  There is not yet a driver available. There are number of
  3616.   people working on it. ARCNet cards provide only rates of about 2Mbps,
  3617.   but are capable of being supported via longer length cables than for
  3618.   10base2 (thinnet) type lans. ARCNet cards are also likely to be fairly
  3619.   cheap, as many businesses are gradually replacing their ARCNet
  3620.   networks with other lan types.
  3621.  
  3622.   Donald Becker started writing a driver some time ago, and you can
  3623.   obtain a copy of the code he has written at:
  3624.  
  3625.   ftp.funet.fi
  3626.  
  3627.  
  3628.        /pub/OS/Linux/BETA/8390/pre-alpha/arcnet.c
  3629.  
  3630.  
  3631.   Please note that this code was last modified in December 1993, so it
  3632.   may need some modification to bring it inline with the newer kernel
  3633.   releases.
  3634.  
  3635.   I would appreciate anyone with any more recent information advising me
  3636.   so that I an update this reference.
  3637.  
  3638.  
  3639.   12.7.  V.35 interface board
  3640.  
  3641.   V.35 is a C.C.I.T.T. standard interface that provides a high speed
  3642.   balanced serial interface suitable for speeds up to about 2 Mbps. The
  3643.   use of differential pair balanced transmission allows the V.35
  3644.   interface to support longer cables than can the more familiar
  3645.   V.24/RS232C type interface and higher data rates.
  3646.  
  3647.   Pete Kruckenberg <kruckenb@sal.cs.utah.edu> located a company that
  3648.   supplies V.35 interface hardware for ISA bus machines. The company is
  3649.   also developing a Linux driver for this card that is nearing Beta
  3650.   testing stage.  This would allow you to directly connect your Linux
  3651.   machine to a 48/56kbps synchronous leased line. The card supports
  3652.   multiple protocols and allows for interface speeds of up to 12 Mbps.
  3653.  
  3654.   More information is available from:
  3655.  
  3656.   ftp.std.com
  3657.  
  3658.  
  3659.        pub/sdl/n2
  3660.  
  3661.  
  3662.  
  3663.  
  3664.   or you can email Dale Dhillon <sdl@world.std.com>
  3665.  
  3666.  
  3667.   13.  Some Frequently Asked Questions, with brief Answers.
  3668.  
  3669.   Following are some questions and answers that are commonly asked.
  3670.  
  3671.  
  3672.  
  3673.      I have only a dialin terminal access to a machine on the net, can I
  3674.         use
  3675.         this as a network connection ?"  Yes you can, take a look at
  3676.         TERM. TERM allows you you to run network connections over a
  3677.         normal terminal session. It requires some modifications to the
  3678.         network applications to work with it, but binaries and sources
  3679.         are available for the most common ones already. take a look at
  3680.         the TERM-HOWTO (http://sunsite.unc.edu/mdw/HOWTO/Term-
  3681.         HOWTO.html) for lots more information.
  3682.  
  3683.  
  3684.      If sunacm.swan.ac.uk is down, how do I get the files specified ?
  3685.         `sunacm' is mirrored on:
  3686.  
  3687.         ftp.Uni-Mainz.DE
  3688.  
  3689.  
  3690.           /pub/Linux/packages/Net2Debugged
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.      How do I know what version of kernel/net code I am running ?
  3698.         The network code and kernel now have synchronised version
  3699.         numbers, so try:
  3700.  
  3701.         uname -a
  3702.  
  3703.         or:
  3704.  
  3705.         cat /proc/version
  3706.  
  3707.  
  3708.      I keep getting the error `eth0: transmit timed out'. What does this
  3709.         mean?
  3710.         This usually means that your Ethernet cable is unplugged, or
  3711.         that the setup parameters for your card (I/O address, IRQ, etc.)
  3712.         are not set correctly.  Check the messages at boot time and make
  3713.         sure that your card is recognized with the correct Ethernet
  3714.         address. If it is, check that there is no conflict with any
  3715.         other hardware in your machine, eg you might have a soundblaster
  3716.         sharing the same IRQ or i/o control port.
  3717.  
  3718.  
  3719.      I get errors `check Ethernet cable' when using the network.
  3720.         You probably have your Ethernet card configured incorrectly.
  3721.         Double check the settings in /usr/src/linux/drivers/net/CONFIG.
  3722.         If this checks out ok, you may in fact have a cabling problem,
  3723.         check the cables are plugged in securely.
  3724.  
  3725.  
  3726.      Why do I get a `network unreachable' message when I try and net-
  3727.         work?
  3728.         This message means that yours, or some other, machine doesn't
  3729.         know how to route to the host that you are attempting to ping or
  3730.         connect to. If it occurs for all hosts that you try, then it is
  3731.         probable that you don't have your default route set up properly,
  3732.         reread the `routing' section.
  3733.  
  3734.  
  3735.      I can ping my server/gateway, but can't ping or connect to anyone
  3736.         remote.
  3737.         This is probably due to a routing problem. Reread the `routing'
  3738.         section in this document. If this looks ok, then make sure that
  3739.         the host you are attempting to connect to has a route to you. If
  3740.         you are a dialin user then this is a common cause of problems,
  3741.         ensure that your server is either running a routing program like
  3742.         gated or routed, or that it is `prox arping' for you, otherwise
  3743.         you will be able to get datagrams to the remote host, but it
  3744.         won't know how to return datagrams to you.
  3745.  
  3746.  
  3747.      How do I use my existing Novell fileserver with my Linux machine ?
  3748.         If you have the Novell NFS Daemon code then it is easy, just NFS
  3749.         mount the Novell volume that you wish to use. If you don't, and
  3750.         you are really desperate to be able to do this, and you have a
  3751.         spare pc machine laying about, you are in luck. You can run a
  3752.         program called Stan's Own Server on the spare PC. First,
  3753.         configure the pc as a novell workstation with maps to the
  3754.         directories you want to nfs mount, then run SOS, and export
  3755.         those drive maps.  SOS is available from
  3756.         spdcc.com:pub/sos/sossexe.zoo
  3757.  
  3758.  
  3759.      Files get corrupted when running NFS over a network.
  3760.         Certain vendors (Sun primarily) shipped many machines running
  3761.         NFS without UDP checksums. Great on ethernet, suicide otherwise.
  3762.         UDP checksums can be enabled on most file servers. Linux has it
  3763.         enabled by default from pl13 onwards - but both ends need to
  3764.         have it enabled...
  3765.  
  3766.  
  3767.      Why are my NFS files all read only ?
  3768.         The Linux NFS server defaults to read only. RTFM the `exports'
  3769.         and nfsd manual pages. With non Linux servers you may also need
  3770.         to alter /etc/exports
  3771.  
  3772.  
  3773.      I want to build my own standalone network, what addresses do I use
  3774.         ?
  3775.         RFC1597 has specifically reserved some IP addresses for private
  3776.         networks.  You should use these as they prevent anything nasty
  3777.         happening if you accidentally get connected to the Internet. The
  3778.         addresses reserved are:
  3779.  
  3780.  
  3781.           10.0.0.0        -   10.255.255.255
  3782.           172.16.0.0      -   172.31.255.255
  3783.           192.168.0.0     -   192.168.255.255
  3784.  
  3785.  
  3786.  
  3787.  
  3788.      Note, reserved network addresses are of classes A, B and C, so you
  3789.      are not restricted in your network design or size. Since you won't
  3790.      be connecting to the Internet it doesn't matter if you use the same
  3791.      address as some other group or network, just so long as the
  3792.      addresses you use are unique within your network.
  3793.  
  3794.  
  3795.      What do I do if I don't know my slip servers address ?
  3796.         dip doesn't really need to know the address of your slip server
  3797.         for slip to function. The remote option was added as a
  3798.         convenience so that dip could automate the ifconfig and route
  3799.         commands for you. If you don't know, and cannot find out the
  3800.         address of your slip server then Peter D. Junger
  3801.         Junger@samsara.law.cwru.edu has suggested that he simply used
  3802.         his own address wherever a dip script called for a remote
  3803.         address. This is a small kludge but it works ok, as the server's
  3804.         address never actually appears in the slip headers anyway.
  3805.  
  3806.  
  3807.      `dip' only works for root. How do I make it work for others?
  3808.         dip needs to be suid root to perform some of the tasks necessary
  3809.         to do its job, so check that the file permissions of dip are
  3810.         6750, that is `chmod 6750 dip'. Check also that dip is owned by
  3811.         root: `chown root:dip dip'.
  3812.  
  3813.  
  3814.      With SLIP I can ping my server, and other hosts, but telnet or ftp
  3815.         don't
  3816.         work."  This is most likely caused by a disagreement on the use
  3817.         of header compression between your server and your machine.
  3818.         Double check that both ends either are, or are not, using
  3819.         compression. They must match.
  3820.  
  3821.  
  3822.      How can I hang up the phone line when I'm done using SLIP?
  3823.         If you use dip to dial out on the SLIP line, just `dip -k'
  3824.         should do the trick. If not, try to kill the dip process that is
  3825.         running. When dip dies it should hang up the call. To give it
  3826.         the best chance to clean up after itself, try killing the
  3827.         process in the following sequence: `kill <pid>', `kill -hup
  3828.         <pid>', and finally, if the dip process still refuses to die,
  3829.         try `kill -9 <pid>'. The same philosophy should be applied to
  3830.         all unix processes that you are attempting to kill.
  3831.  
  3832.  
  3833.      I see a lot of overrun errors on my slip port, why ?
  3834.         The older network tools incorrectly report number of packets
  3835.         compressed as the number of packets overrun. This has been
  3836.         corrected, and shouldn't occur of you are running the new
  3837.         version kernel and tools. If it still is it probably indicates
  3838.         that your machine isn't keeping up with the rate of data
  3839.         incoming. If you are not using 16550AFN UARTs then you should
  3840.         upgrade to them. 16450, or 8250 generate an interrupt for every
  3841.         character they receive and are therefore very reliant on the
  3842.         processor to be able to find time to stop what it is doing an
  3843.         collect the character from them to ensure none get lost. The
  3844.         16500AFN has a 16 character FIFO, and they only generate
  3845.         interrupts when the FIFO is nearly full, or when they have had
  3846.         character waiting, this means that less interrupts get generated
  3847.         for the same amount of data, and that less time is spent
  3848.         servicing your serial port. If you want to use multiple serial
  3849.         ports you should mandatorily upgrade to 16550AFN UARTs anyway.
  3850.  
  3851.  
  3852.      Can I use two slip interfaces ?
  3853.         Yes. If you have, for example, three machines which you would
  3854.         like to interconnect, then you most certainly could use two slip
  3855.         interfaces on one machine and connect each of the other machines
  3856.         to it. Simply configure the second interface as you did the
  3857.         first. NOTE that the second interface will require a different
  3858.         IP address to the first. You may need to play with the routing a
  3859.         bit to get it to do what you want, but it should work.
  3860.  
  3861.  
  3862.      I have a multiport i/o card, how do I use more than 4 slip ports ?
  3863.         The kernel slip comes with a default of a maximum of 4 slip
  3864.         devices configured, this is set in the
  3865.         /usr/src/linux/drivers/net/slip.h file.  To increase it, say to
  3866.         16, change the #define SL_NRUNIT to 16, in place of the 4 that
  3867.         will be there. You also need to edit
  3868.         /usr/src/linux/drivers/net/Space.c and add sections for sl4, sl5
  3869.         etc. You can copy the existing driver definition as a template
  3870.         to make it easier. You will need to recompile the kernel for the
  3871.         change to take effect.
  3872.  
  3873.  
  3874.  
  3875.   14.  Known Bugs.
  3876.  
  3877.   The Linux networking code is still an evolving thing. It still has
  3878.   bugs though they are becoming less frequently reported now. The Linux
  3879.   Networking News (http://iifeak.swan.ac.uk/NetNews.html) is a World
  3880.   Wide Web page maintained by Alan Cox which contains information on the
  3881.   status of the NET-3 networking code. You can obtain information on
  3882.   what is known and what isn't, by reading the
  3883.   /usr/src/linux/net/inet/README file that accompanies the kernel
  3884.   source, or by joining the NET channel.
  3885.  
  3886.  
  3887.   15.  Copyright Message.
  3888.  
  3889.   The NET-2-HOWTO is copyright by Terry Dawson and Matt Welsh. A
  3890.   verbatim copy of this document may be reproduced and distributed in
  3891.   any medium, physical or electronic without permission of the authors.
  3892.   Translations are similarly permitted without express permission if
  3893.   such translations include a notice stating who performed the
  3894.   translation, and that it is a translation.  Commercial redistribution
  3895.   is allowed and encouraged, however, the authors would like to be
  3896.   notified of any such distributions.
  3897.  
  3898.   Short quotes may be used without prior consent by the authors.
  3899.   Derivative works and partial distributions of the NET-2-HOWTO must
  3900.   include either a verbatim copy of this file, or make a verbatim copy
  3901.   of this file available.  If the latter is the case, a pointer to the
  3902.   verbatim copy must be stated at a clearly visible place.
  3903.  
  3904.   In short, we wish to promote dissemination of this information through
  3905.   as many channels as possible. However, we wish to retain copyright on
  3906.   this HOWTO document, and would like to be notified of any plans to
  3907.   redistribute it.  Further we desire that ALL information provided in
  3908.   this HOWTO be disseminated.
  3909.  
  3910.   If you have any questions relating to the conditions of this
  3911.   copyright, please contact Matt Welsh, the Linux HOWTO coordinator, at:
  3912.   mdw@sunsite.unc.edu, or +1 607 256 7372.
  3913.  
  3914.  
  3915.   16.  Miscellaneous, and Acknowledgements.
  3916.  
  3917.   This HOWTO has been completely rewritten using the new smgl tools that
  3918.   Matt Welsh put together. The tools seem to work just fine, and they
  3919.   are pretty simple to use. There are so many people who have
  3920.   contributed comments and suggestions for this update that I have
  3921.   forgotten who you are. Thanks.
  3922.  
  3923.   Please, if you have any comments or suggestions then mail them to me.
  3924.   I'm fairly busy these days, so I might not get back to you straight
  3925.   away, but I will certainly consider any suggestion you have.
  3926.  
  3927.   The Linux networking code has come a long way, and it hasn't been an
  3928.   easy trip, but the developers, all of them, have done an excellent job
  3929.   in getting together something that is functional, versatile, flexible,
  3930.   and free for us to use. We all owe them a great debt of thanks. Linus,
  3931.   Ross, Fred, Alan, the Alpha/Beta testers, the tools developers, and
  3932.   those offering moral support have all contributed to the code as it is
  3933.   today.
  3934.  
  3935.   For those that have an itch they want to scratch, happy hacking, here
  3936.   it is.
  3937.  
  3938.   73
  3939.  
  3940.   Terry Dawson, vk2ktj.
  3941.  
  3942.   <terryd@extro.ucc.su.oz.au>, or <terry@orac.dn.telecom.com.au>
  3943.